Domanda

Despite best efforts, I have images in cache that aren't loading, primarily because they are not present in the cache directory. I have tried clearing the media images cache. Short of deleting all contents of that directory or manually trying to import the images (which I would need to resize to the respective size before importing), I have tried everything to get the images stored in the cache directory. The images were previously loading, but aren't anymore. Does anyone have a solution?

È stato utile?

Soluzione

There are many things that could be causing this issue, Please look into few things:

  1. Make sure the product images exist under /media/catalog/product/ (relative to your document root)
  2. On the Product Information page in your admin backend, under 'Images', make sure the radio buttons have an image selected for 'Base Image', 'Small Image', 'Thumbnail', and that they aren't 'Excluded'.

  3. Make sure the /media directory is in your Apache web server's group (usually 'www-data' or 'httpd'). Magento also needs to be able to write to this directory, so you can run this command to set those permissions:

    sudo chmod -R 775 /path/to/magento/media

  4. In System->Configuration->General->Web, make sure "Base Media URL" is correct under both "Secure" and "Unsecure.

If this answer is useful Please mark it as solution thanks.

Altri suggerimenti

Use below commands for Magento 2 :

  1. rm -rf var/* generated/* pub/static/*
  2. php bin/magento setup:static-content:deploy -f
  3. chmod -R 0777 var/* generated/* pub/static/*
  4. php bin/magento cache:flush

For Magento 1 :

  1. media folder permission 777

  2. deleted htaccess file under the media folder

  3. clear the cache and full_page_cache

  4. cache folder is writeable

  5. rebuilt all indexes

Hint : https://stackoverflow.com/questions/20074824/magento-not-rebuilding-product-image-cache

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top