2

In magneto2.3.1 - I have used porto theme I notice some images not generated cache inside, I apply all commands on my live site, but not getting any error and also I apply image resize command php bin/magento catalog:images:resize but some images showing but rest of not loading on detail page in console getting image below error :

Failed to load resource: the server responded with a status of 404 ()  pub/media/catalog/product/cache/9d08971813a040f8f96067a40f75c615/p/m/pm0003_5.jpg

if anyone know regarding this type of issue facing reply me

1
  • it seems .htaccess file missing in the pub/static folder on the server. Please get .htaccess file from fresh download and add to pub/static folder. Check the permission of /magentorootfolder/pub/media folder. If permissions are proper, then you will have to fire php bin/magento catalog:images:resize command, from magento root folder, this command will regenerate images . Also, this process will take some time, as it will generate all images again. Commented Oct 7, 2019 at 9:48

1 Answer 1

0

Please 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.

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.