Categories

Posts by Date

May 2013
M T W T F S S
« Dec    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Uploaded Images Not Showing in PrestaShop

Until this morning, I had no problems adding images to a new PrestaShop (1.3.7) site I am installing for a client. That is, until suddenly newly uploaded images stopped showing.  It took me a while to google for answers and quite a few led me in the entirely wrong direction. Then I realised that after running a file permissions update, my images reappeared but any new images again went AWOL. Trying to view the image links in a new window gave an Access Permission error, so it had to be down to permissions after all.

I still haven’t figured out why PrestaShop stopped giving new images the correct 644 permission when it had done it perfectly well until this morning. But Rocky at Nethercott Constructions had the perfect workaround:

In the images.inc.php file, insert a line after line 256 and place

chmod($filename, 0644);

just in front of:

imagedestroy($ressource);
return $flag;

Sorted!! Now, all new images are created with the correct file permission and everybody is happy. Any clues as to why PrestaShop stopped doing it itself are however still very welcome!

4 comments to Uploaded Images Not Showing in PrestaShop

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*