Reco-X Posted January 31, 2014 Share Posted January 31, 2014 (edited) Hello, i want to import some images for the products (2 per product). I can do it perfectly with the absolute url like this: http://www.canon.es/Images/Canon_Logo_350_tcm86-959888.jpg But when i want to use some images from my own proyect i want use a relative path like this: img/peliculas/dvd/front/P00050.jpg and it doesn't work. Any idea to solve this?? Edited February 5, 2014 by Reco-X (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 31, 2014 Share Posted January 31, 2014 As far as I know, you have to use absolute urls, no matter what But anyone may feel free to correct me if they managed to accomplish it without 1 Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2014 Share Posted January 31, 2014 i tried several times before to import images with "realtive" path, it did not work, when i use full path - it works. so i agree with you Nemo. Link to comment Share on other sites More sharing options...
Reco-X Posted January 31, 2014 Author Share Posted January 31, 2014 woww, that is strange. And how is the way to use images from local?? see i didn't get a domain yet. Link to comment Share on other sites More sharing options...
NemoPS Posted January 31, 2014 Share Posted January 31, 2014 locally? on localhost? just use the link as you'd do with a localhost page Link to comment Share on other sites More sharing options...
Reco-X Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) locally? on localhost? just use the link as you'd do with a localhost page See, if i want to use the image in local the url will be http://localhost/prestashop/img/peliculas/dvd/front/P00050.jpg but when i upload the site to production the url will be http://www.BLABLABLA.com/img/peliculas/dvd/front/P00050.jpg did you understand my problem? For the comments of you 2 guys, I understood it's impossible, but i must to resolve this doubt . Edited January 31, 2014 by Reco-X (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted January 31, 2014 Share Posted January 31, 2014 No worries, the image will be moved when you import it Link to comment Share on other sites More sharing options...
Reco-X Posted January 31, 2014 Author Share Posted January 31, 2014 No worries, the image will be moved when you import it Sorry i didn't understood. You say if a put my url like this http://localhost/prestashop/img/peliculas/dvd/front/P00050.jpg When i move to another server it'll convert automaticaly to this?? http://www.BLABLABLA.com/img/peliculas/dvd/front/P00050.jpg How is this possible?? Link to comment Share on other sites More sharing options...
NemoPS Posted February 1, 2014 Share Posted February 1, 2014 no, this url will NEVER be the image url of a product: http://localhost/prestashop/img/peliculas/dvd/front/P00050.jpg Because when you import, prestashop moves the images to its own directory. Then, links are generated on the fly. Therefore, whn you move the site to live, if might don't even need to regenerate thumbs again 2 Link to comment Share on other sites More sharing options...
janoo Posted February 23, 2015 Share Posted February 23, 2015 (edited) no, this url will NEVER be the image url of a product: http://localhost/prestashop/img/peliculas/dvd/front/P00050.jpg Because when you import, prestashop moves the images to its own directory. Then, links are generated on the fly. Therefore, whn you move the site to live, if might don't even need to regenerate thumbs again But if you copy complete PS from Localhost to destination on real server, and your images are already imported, url of images are copied i database with localhost url. Not true? I´ve put relative url to img in source: <img src="../img/cms/0902.jpg" /> and to htaccess. I´ve added: RewriteRule ^(.*)/img/cms/(.*).(jpe?g|png|gif)$ %{ENV:REWRITEBASE}img/cms/$2.$3 [NC,L] before this: # Images But still be carefull to prestashop can change htaccess. This rule works on thet place, not before # ~~start~~ and not after # ~~end~~ Maybe it is not general solution. It worked for me, and not in multilanguage version (maybe..) Edited February 23, 2015 by janoo (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted February 25, 2015 Share Posted February 25, 2015 well no, it's never going to work as product image for the simple reason that is not the path to any existing folder for product images, there are no subfolders named like that, unless you add a very specific rewrite rule for it (but it would be cray to, for each product) Cms images are different, that's why your solution works There is no reference to the product image link in the db Link to comment Share on other sites More sharing options...
bchiorello Posted October 8, 2015 Share Posted October 8, 2015 Hoping Nemo1 can help as I have been watching your videos on youtube. I have uploaded images (10) to Catalog/Products/ for a specific new product. I want to use the IMPORT function CSV file to create COMBINATIONS since I am getting an average of 48-72 different combos on my products. I want a specific image to show with the combination - I have been manually updating it after I use the Combination Generator but its taking me hours. The CSV seems to need the image URL - how do I find that for the images I uploaded to Prestashops Catalog/Products??? Thanks Brian Link to comment Share on other sites More sharing options...
NemoPS Posted October 9, 2015 Share Posted October 9, 2015 Hi Brian, It would be easier if you hard those images hosted elsewhere. Since you don't, and they are part of the product, the quickest way I know is just checking the product in the front office and get them that way, the bigger version of course Link to comment Share on other sites More sharing options...
fanabela Posted October 21, 2016 Share Posted October 21, 2016 hi there...im having trouble uploading images. dont really know how to create an "http:/......" link where the photos must be located so i can copy it into de csv document and then import it from prestashop. can you help me? thanks.!!! Link to comment Share on other sites More sharing options...
NemoPS Posted October 21, 2016 Share Posted October 21, 2016 Upload them to a folder of your hosting space via ftp or file manager. Then just use your domain/folder/imagename.jpg to refer to it in the csv Link to comment Share on other sites More sharing options...
Reco-X Posted October 21, 2016 Author Share Posted October 21, 2016 (edited) hi there...im having trouble uploading images. dont really know how to create an "http:/......" link where the photos must be located so i can copy it into de csv document and then import it from prestashop. can you help me? thanks.!!! You can use too every url linking an image, for example: https://www.google.co.id/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png thats all. Edited October 21, 2016 by Reco-X (see edit history) Link to comment Share on other sites More sharing options...
fanabela Posted October 21, 2016 Share Posted October 21, 2016 i get it..but i have all the pictures i need located on my computer and the link they show is something like "D:\0usuario\Documentos\TIENDA ON LINE\dijes\de065050.jpg" Link to comment Share on other sites More sharing options...
fanabela Posted October 21, 2016 Share Posted October 21, 2016 o sea,,, donde tengo que poner mis fotos para que su direccion url pueda ser http:/......................." where do i have to put the pictures to get an absolute url from them... Link to comment Share on other sites More sharing options...
Reco-X Posted October 22, 2016 Author Share Posted October 22, 2016 You must upload the pictures to some server, you can't use your local computer. Please read about FTP Link to comment Share on other sites More sharing options...
NemoPS Posted October 22, 2016 Share Posted October 22, 2016 Please read the message I wrote above, you need to upload the whole image folder you have ti your site or some other webspace, then get the links to it as I described. You can either use ftp or the file manager cpanel usually has Link to comment Share on other sites More sharing options...
Martin Uker K Posted October 28, 2016 Share Posted October 28, 2016 Hi all, I was reading this subject and doing an import on the side. I always prefer to use relative copy for import purpose. it saves some time on import. I must say that I never used it on PrestaShop, thinking it was impossible. Then I red Vekia saying (back in 2014) that he was unable to do relative path import. THAT was the moment a little voice in my head said : "Oh *?%! IT. IS. ON." And I set my self on reverse engineering mode ot see how we could do relative path with PrestaShop...I didn't consult documentation, because...sadly PrestaShop is lacking there! What I found out : You can't use relative PATH* (I INSIST on word PATH). You can't use "./" or "../", your url will be exploded on "/", then reconstructed with a starting "/". Which means, if you use "../my_great_image.jpg", it will be rewrote as "/../my_great_image.jpg". You need to use absolute PATH (I still INSIST on word PATH). So, let's say your filesystem map you app in "/home/user/domain/prestashop/", you need to use : "home/user/domain/prestashop/image-import/my_great_image.jpg" Best regards to all, Jedi out Martin. 1 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