im having an unusual problem when i try to access a saved file. i am saving an image to the media folder where i have created another floder called customers. the folder is set to 775. when i add an image using php it saves the image correctly to the folder but when i try to access the image using theu url link it doesn't work - i have checked if the image url is correct and it is but i don't know why i am getting a 404 error when i access the image. i have uploaded pictures using php before on this site for the blog section and it works fine and i can see the images correctly but i don't know why when i upload images to the customers folder, the images don't display

Please could someone help

  • have you installed the latest security patch recently? – David Verholen Feb 7 '16 at 13:48
  • no i havent installed it - do i need to? – AN11 Feb 7 '16 at 17:07
  • you should always ;) but there was a change which limited the permissions of new images created so that many shops had the problem that they could not see them anymore in the frontend (and in backend). – David Verholen Feb 7 '16 at 17:09
  • if i do the update will it delete my files - because i have some in the base folder and i don't want them to be removed. – AN11 Feb 7 '16 at 17:14
  • i know that i shouldn't have done anything to that folder but its too late to change it – AN11 Feb 7 '16 at 17:14

Can you provide the url you are using to display the image file placed in customer folder of media directory?


Have you installed the security patch SUPEE-7405? then check this:

Source: http://my.aspirationhosting.com/knowledgebase/1482/Image-Upload-Issue-with-Magento-1923-or-SUPEE-7405.html

Magento Community Edition and the Security Patch SUPEE-7405 introduced a new bug with image uploading which resulted in incorrect file permissions for newly uploaded images. 

If you have uploaded any images which are not showing up, the first thing to do is to set the correct file permissions for your files and databases. 

To permanently resolve the problem, you will need to modify a file within Magento. 

Important Note: This is a manual hack which will be overwritten during a Magento upgrade. 

Open up the following file:-

Look for this line:-
chmod($destinationFile, 0640);

Replace it with this line:-
chmod($destinationFile, 0644);

Look for this line:-
chmod($destinationFile, 0750);

Replace it with this line:-
chmod($destinationFile, 0755);

Save the file and the next image uploaded should load properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.