Benn Posted March 9, 2010 Share Posted March 9, 2010 I would like to know, after I add product to database, where is stored path to product image? I searched all database but didn't found it. If product image path is stored not in DB then where? Thx Link to comment Share on other sites More sharing options...
Daniel Ciornei Posted March 9, 2010 Share Posted March 9, 2010 your_presta_folder/img/p/most of the images go ther. P as in product. 1 1 Link to comment Share on other sites More sharing options...
Benn Posted March 9, 2010 Author Share Posted March 9, 2010 you didn't understand my question. I from where is script reading that img is in img/p/ dir 1 Link to comment Share on other sites More sharing options...
Daniel Ciornei Posted March 9, 2010 Share Posted March 9, 2010 ok . so you want to find out the path to an image?explain what you want to do with that path maybe i can understand better what you are trying to do Link to comment Share on other sites More sharing options...
razaro Posted March 9, 2010 Share Posted March 9, 2010 Example: in this code from homefeatured.tpl getImageLink($product.link_rewrite, $product.id_image, 'large')}" height="260px" width="300px" alt="{$product.legend|escape:html:'UTF-8'}" /> And here is function from Link.php in classes directory public function getImageLink($name, $ids, $type = null) { return ($this->allow == 1) ? (__PS_BASE_URI__.$ids.($type ? '-'.$type : '').'/'.$name.'.jpg') : (_THEME_PROD_DIR_.$ids.($type ? '-'.$type : '').'.jpg'); } 1 Link to comment Share on other sites More sharing options...
uddhava Posted March 9, 2010 Share Posted March 9, 2010 Images from categories and products are stored in :categories : /img/cproducts : /img/pAll images are named with the ID in its name. So if your category iPods has ID 2 then the image name is 2.jpgetc etc 1 1 Link to comment Share on other sites More sharing options...
rocky Posted March 10, 2010 Share Posted March 10, 2010 Topics merged Link to comment Share on other sites More sharing options...
muhsinap Posted March 30, 2013 Share Posted March 30, 2013 Hai Anyone know the manual sql query to get image of a product. ie: id_product=1 and i need image of this product. Link to comment Share on other sites More sharing options...
jwzumwalt Posted April 4, 2013 Share Posted April 4, 2013 (edited) There is no sql query because the image is not stored in the database. The image is in a directory and is stored as an ordinary file Edited April 4, 2013 by jwzumwalt (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted April 4, 2013 Share Posted April 4, 2013 i think that he said about an url to product, and he asked about how to get it, but i might be wrong Link to comment Share on other sites More sharing options...
muhsinap Posted April 5, 2013 Share Posted April 5, 2013 There is no sql query because the image is not stored in the database. The image is in a directory and is stored as an ordinary file Yen now all i understood It's funny way to get a product path Link to comment Share on other sites More sharing options...
muhsinap Posted April 5, 2013 Share Posted April 5, 2013 (edited) Hai I need to insert a customer manually using phpMyadmin. I have already inserted all details in to table 'ps_customer' but when login with that id it cannot showing all layout clearly..means not showing header, all menus and side bars. any one can help me please ? Edited April 5, 2013 by muhsinap (see edit history) Link to comment Share on other sites More sharing options...
Dolke Posted August 19, 2013 Share Posted August 19, 2013 Hi to all, So all images related to products are in the img/p folder and all those related to categories are in img/c folder under public_html on the server right? So only way to get local copy (backup) of those images would be to download the whole folders to a local hdd? I guess I'll use cPanel file manager instead of FileZilla as I can make archive and download the whole archive instead of downloading image by image using FTP. Please correct me if Im wrong. P.S. I guess I'll be downloading all images including original ones. How can I simply get only original ones into a separate folder? Ty in advance for the time and efforts. Dean Link to comment Share on other sites More sharing options...
mma87 Posted September 24, 2013 Share Posted September 24, 2013 Hi, in /img/p path there isn't all products' images, where can I found all the images? thanks Matteo Link to comment Share on other sites More sharing options...
vekia Posted September 24, 2013 Share Posted September 24, 2013 there are all product images, especially in subdirectories /img/p/1/ img/p/2/ img/p/3/ etc. Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 thanks for the reply vekia! there are some images that I can't find, there aren't even in the subdirectories Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2013 Share Posted September 25, 2013 can you show the url to these images? Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 for instance I can't find the images of this product http://www.italia-mobili.it/870-tavoli-in-legno-allungabile-brooklyn.html Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2013 Share Posted September 25, 2013 i cant open: Link to comment Share on other sites More sharing options...
NemoPS Posted September 25, 2013 Share Posted September 25, 2013 They are being rewritten, for example, here is one of them http://www.italia-mobili.it/870-3838-medium/tavoli-in-legno-allungabile-brooklyn.jpg I think it could be at img/p/870/3838/medium_default.jpg Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 @vekia, refresh the page, I have some problems with the hosting @Nemo1 there isn't the folder 870, above the screenshot of the folders that I have in P directory Link to comment Share on other sites More sharing options...
NemoPS Posted September 25, 2013 Share Posted September 25, 2013 hmmm! Prestashop version? Can you check in preferences, products in the back office, and see if you are using the "Legacy filesystem"? Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 the PS version is 1.4.7.0 Use the legacy image filesystem YES Link to comment Share on other sites More sharing options...
NemoPS Posted September 25, 2013 Share Posted September 25, 2013 That's why then. Set it to NO, then go to images, preferences and move all images. If they still don't display, regenerate all of them Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 Thank you very much!! I do this operation! I have a question: if I do this steps, do I lost some images or link? Link to comment Share on other sites More sharing options...
NemoPS Posted September 25, 2013 Share Posted September 25, 2013 Links from within the store will be regenerated. As they are rewritten, they will *probably* stay the same, but to be honest I don't remember what ps 1.4 used to do! Link to comment Share on other sites More sharing options...
mma87 Posted September 25, 2013 Share Posted September 25, 2013 ok, I do some tests with localhost, thank you very much again!! Link to comment Share on other sites More sharing options...
onahkenneth Posted January 23, 2014 Share Posted January 23, 2014 Please I need help. Can someone point me to where I can find this image in /img/p directory "http://supplizor.com/pens-pencils-markers/2772-artline-ek90-permanent-marker-chisel-point.html" Link to comment Share on other sites More sharing options...
vekia Posted January 23, 2014 Share Posted January 23, 2014 your website is under maintenance mode, so in effect we cant check it. Link to comment Share on other sites More sharing options...
rhemaxos Posted February 5, 2014 Share Posted February 5, 2014 Hai I need to insert a customer manually using phpMyadmin. I have already inserted all details in to table 'ps_customer' but when login with that id it cannot showing all layout clearly..means not showing header, all menus and side bars. any one can help me please ? Try updating the shop_id and the shop_group_id. Also you should try logging-in from another browser (free cache). Link to comment Share on other sites More sharing options...
malcek Posted February 13, 2014 Share Posted February 13, 2014 Hi, I'm also loking for place where is path to original image. I need it for exporting to other shops and I need it without white space around picture. We can get picture, but it is in this format http://www.trgovina-figura.si/16214-thickbox/zenska-obleka-k007.jpg whish is unusable for this purpose. I need in such path http://www.trgovina-figura.si/img/p/4/3/16214.jpg which is absolute path to picture ( in this case it is not correct) How to get this path to picture? Best regards Martin Link to comment Share on other sites More sharing options...
midunmkumar Posted December 18, 2014 Share Posted December 18, 2014 @nemo1 hi i have upgrade from 1.5.3 to 1.5.6.1 after move the image from BO still question mark visible for some of product images. now I want to know where can I found the image of following product http://www.colorconceptions.com/buy-decoupage-napkonline-india/64100449-africansilhouettesdecoupagenapkin.html thanks in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted December 19, 2014 Share Posted December 19, 2014 Try regenerating your htaccess file from the seo and urls tab, just hit the save button there Link to comment Share on other sites More sharing options...
JoelWebsites Posted February 4, 2015 Share Posted February 4, 2015 (edited) Suppose If the image id of the product is 870.... you will need to go to img/p/8/7/0 and you should see the image You will get the image id of the product in the the ps_image table in the database. Edited February 4, 2015 by JoelWebsites (see edit history) Link to comment Share on other sites More sharing options...
trevorgilligan Posted June 10, 2015 Share Posted June 10, 2015 from what i have seen it is one of 2 locations. 1st it should be theme/img/p . if not there, check rootfolder/img/p . reason i say this is cos i had multistore and was url rewritten in htaccess so i was consfused. also if you have a module, it can be in either a) themes/modules/moduleName/img or a) root/modules/moduleName/img hope this helps Link to comment Share on other sites More sharing options...
cooliyev Posted September 14, 2015 Share Posted September 14, 2015 Try regenerating your htaccess file from the seo and urls tab, just hit the save button there Hi Nemo. You are the smartest here)) do you know how to get all image links of 1 product. I have this code concat( 'http://', ifnull( conf.value, 'marm.pl' ) , '/img/p/',mid(p.id_product,1,1),'/', if (length(p.id_product)>1,concat(mid(p.id_product,2,1),'/'),''), if (length(p.id_product)>2,concat(mid(p.id_product,3,1),'/'),''), if (length(p.id_product)>3,concat(mid(p.id_product,4,1),'/'),''), if (length(p.id_product)>4,concat(mid(p.id_product,5,1),'/'),''), p.id_product, '.jpg' ) AS url_image and it takes only main image. But how to get 2nd, 3rd image links? Link to comment Share on other sites More sharing options...
NemoPS Posted September 16, 2015 Share Posted September 16, 2015 You're too kind, especially cause I am no SQL [spam-filter] at all I take it as you are not using url rewriting there?As far as I know you'd need a subquery to grab all image ids from the image tab, there id_product equals yours Link to comment Share on other sites More sharing options...
Moodi Posted February 18, 2019 Share Posted February 18, 2019 Hi, I got my website backup & found the p folder where all images saved. But my aim is to link my exported products with the image name. Example pepsi product has ID1000 but the picture name not the same?! Anyone can tell me does image number represnt? Link to comment Share on other sites More sharing options...
malcek Posted February 18, 2019 Share Posted February 18, 2019 if you have set up google sitemap then you have inside picture url Link to comment Share on other sites More sharing options...
mma87 Posted February 19, 2019 Share Posted February 19, 2019 in your database you can find the table called ps_image where you can find the association with images and products. for example you have for product ID 1000 an image with id 1234 you can found all images size in /img/p/1/2/3/4/ (one folder for each number of the id) in this folder you can find always the file 1234.jpg and also the other image size you associate for the product (for example 1234-home_default.jpg) Link to comment Share on other sites More sharing options...
Moodi Posted February 19, 2019 Share Posted February 19, 2019 Hi, I got my pictures as attached in above post, but the problem is that I need these pictures in one folder only and not subfolders..., please advise? BR// Link to comment Share on other sites More sharing options...
mma87 Posted February 19, 2019 Share Posted February 19, 2019 if you need to have all images in one folder, if you have a windows pc you can do those steps: - create a new folder you'll use to put all images - open img/p - search *.jpg - copy all images showed in the search result - paste the image in the new folder Link to comment Share on other sites More sharing options...
Moodi Posted February 19, 2019 Share Posted February 19, 2019 Thanks for your advice, its works, but why I have for each product multiple pictures (six pictures)? How can i delete duplicates or only get certain image name. Please check attachment. Link to comment Share on other sites More sharing options...
mma87 Posted February 20, 2019 Share Posted February 20, 2019 you're welcome! if you don't need other image you can search cart_default home_default large_default etc and delete all the results Link to comment Share on other sites More sharing options...
leobardo Posted May 22, 2019 Share Posted May 22, 2019 On 2/19/2019 at 5:41 AM, mma87 said: in your database you can find the table called ps_image where you can find the association with images and products. for example you have for product ID 1000 an image with id 1234 you can found all images size in /img/p/1/2/3/4/ (one folder for each number of the id) in this folder you can find always the file 1234.jpg and also the other image size you associate for the product (for example 1234-home_default.jpg) this answer solved my problem, now I am able to create direct link to image.... check in ps_image for the id_image and from there you can create the link, thank you !! 1 Link to comment Share on other sites More sharing options...
Moodi Posted May 23, 2019 Share Posted May 23, 2019 Thank you for your reply. But actually what you have mentioned is important & I know it. But my problem is that I have a list of products which I need its images. Doing what you've mentioned is a headache, is there a way to automate this in an easier way to help extract an only a specific group of image IDs? Regards, Link to comment Share on other sites More sharing options...
mma87 Posted May 27, 2019 Share Posted May 27, 2019 On 5/22/2019 at 10:22 PM, leobardo said: this answer solved my problem, now I am able to create direct link to image.... check in ps_image for the id_image and from there you can create the link, thank you !! You're welcome! Link to comment Share on other sites More sharing options...
mma87 Posted May 27, 2019 Share Posted May 27, 2019 On 5/23/2019 at 4:00 AM, Moodi said: Thank you for your reply. But actually what you have mentioned is important & I know it. But my problem is that I have a list of products which I need its images. Doing what you've mentioned is a headache, is there a way to automate this in an easier way to help extract an only a specific group of image IDs? Regards, An easy solution, if you have a list of IDs is using an excel file, but you have to know excel functions Link to comment Share on other sites More sharing options...
diondlemarcu Posted April 6, 2020 Share Posted April 6, 2020 (edited) On 3/9/2010 at 4:59 PM, Benn said: I would like to know, after I add product to Showbox jiofi.local.html tplinklogin database, where is stored path to product image? I searched all database but didn't found it. If product image path is stored not in DB then where? Thx my aim is to link my exported products with the image name. Example pepsi product has ID1000 but the picture name not the same?! Anyone can tell me does image number represnt? Edited April 6, 2020 by diondlemarcu (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted April 6, 2020 Share Posted April 6, 2020 Image number is just image number, it's linked to product in the database Link to comment Share on other sites More sharing options...
SebyM Posted January 29, 2021 Share Posted January 29, 2021 If anyone still need this, try: SELECT p.id_product, concat( 'https://yoursite.url/img/p/',mid(`i`.`id_image`,1,1),'/', if (length(`i`.`id_image`)>1,concat(mid(`i`.`id_image`,2,1),'/'),''), if (length(`i`.`id_image`)>2,concat(mid(`i`.`id_image`,3,1),'/'),''), if (length(`i`.`id_image`)>3,concat(mid(`i`.`id_image`,4,1),'/'),''), if (length(`i`.`id_image`)>4,concat(mid(`i`.`id_image`,5,1),'/'),''), `i`.`id_image`,'-large_default.jpg') AS image FROM `ps_product` `p` JOIN `ps_image` `i` ON `p`.`id_product` = `i`.`id_product` WHERE `i`.`cover` = 1 Last WHERE will only show the cover images, remove to show ALL image urls. 1 Link to comment Share on other sites More sharing options...
Alex.Vt Posted April 12, 2021 Share Posted April 12, 2021 ger On 1/29/2021 at 11:00 PM, SebyM said: If anyone still need this, try: SELECT p.id_product, concat( 'https://yoursite.url/img/p/',mid(`i`.`id_image`,1,1),'/', if (length(`i`.`id_image`)>1,concat(mid(`i`.`id_image`,2,1),'/'),''), if (length(`i`.`id_image`)>2,concat(mid(`i`.`id_image`,3,1),'/'),''), if (length(`i`.`id_image`)>3,concat(mid(`i`.`id_image`,4,1),'/'),''), if (length(`i`.`id_image`)>4,concat(mid(`i`.`id_image`,5,1),'/'),''), `i`.`id_image`,'-large_default.jpg') AS image FROM `ps_product` `p` JOIN `ps_image` `i` ON `p`.`id_product` = `i`.`id_product` WHERE `i`.`cover` = 1 Last WHERE will only show the cover images, remove to show ALL image urls. Great works fine !| Link to comment Share on other sites More sharing options...
Victor Aponte Posted November 2, 2022 Share Posted November 2, 2022 Hello friends I'm kind of new in Prestashop so a Hook to open a new field to add icons in categories ! how do I do to be able to save image or icon format in the database because first I did a text field and that if you can save but I think to save image is already something different thank you so much for your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now