xlynx Posted May 25, 2015 Share Posted May 25, 2015 (edited) Hello, I am running the last version of prestashop (1.6.0.14) and some images are not showing, The bug appears on cms pages and only when friendly url is enabled. An other user had the same issue, and had updated his prestashop and the bug disappear, but i am running the last version and the bug is sill here. Post from Acido : https://www.prestashop.com/forums/topic/317154-images-not-showing/ Unfortunately this fix doesn't work to me. All the image that i upload to the cms page, are pointed to www.domain.com/en/img/cms/image.jpg By change the language, the url change pointing to the new language, example: www.domain.com/en/img/cms/image.jpg That it's what ruin the image url which is www.domain.com/img/cms/image.jpg The image path include the language iso code like (en or de), its why it fails to load images. Any help is welcome! Thanks in advance. xlynx Edited June 6, 2015 by xlynx (see edit history) Link to comment Share on other sites More sharing options...
xlynx Posted May 26, 2015 Author Share Posted May 26, 2015 Hey, The bug happens only with the default image and cms, when I add images in the tinymce, the links are correct in the front office. Best xlynx Link to comment Share on other sites More sharing options...
ramchia Posted June 6, 2015 Share Posted June 6, 2015 Same problem here... The shop was created and developed using only one language, so the path doesn't have iso code in it: domain.com/img/cms/image.jpg now decided to add another language and whole shop is now under domain.com/en/ and domain.com/de/ so, and all images in CMS disappeared because of this language iso code in the path. How to solve this? Please help. Link to comment Share on other sites More sharing options...
xlynx Posted June 6, 2015 Author Share Posted June 6, 2015 (edited) Hey, To remove the language iso code from the url, you can add in your .htacess this line : RewriteRule ^(.*)/img/cms/(.*)$ /img/cms/ [L,R=301] It works for me with the default cms folder. An other thing .... When I check the code source of the CMSs, I find that URLs have domain name written, and its bad if we are working on local environment and we want to export it after in a production environment. To avoid this, when we add an image in TinyMce "insert-edit image", we can change the source of the image by removing the domain name and let only "/img/cms/image.jpg". Best xlynx Edited June 6, 2015 by xlynx (see edit history) Link to comment Share on other sites More sharing options...
haggard_ua Posted September 26, 2017 Share Posted September 26, 2017 it will work after set up full path to image: RewriteRule ^(.*)/img/cms/(.*)$ /img/cms/$2 [L,R=301] Link to comment Share on other sites More sharing options...
Recommended Posts