I just updated Magento 2 CE from 2.0.7 to 2.1.5. I used the terminal method and all seems well. Everything is working and the new version is reflected in the bottom of the admin section. Only problem I'm having is that the product images now return a 404.

An example path that use to work but is now 404: https://example.com/media/catalog/product/i/p/iphone6s_family_280x420.png

What does actually work: https://example.com/pub/media/catalog/product/i/p/iphone6s_family_280x420.png

How can I correct this? Thanks.

1 Answer 1


Please make sure to double check owner and group of pub/media directory.

You may run this command from magento root directory:

sudo chown www-data:www-data -R pub/media
find ./pub/media -type d -exec chmod 777 {} \;

Assuming www-data is used as Apache user.

Apache user should have permissions to a pub/media/catalog/product directory to create resized product image files.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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