0

In Magento admin System > Cache Management and then click on button Flush Catalog Images Cache.

Then Images not showing in frontend.

But If I apply below command then Images showing

php bin/magento catalog:image:resize

Can I need everytime apply this command? or Is any some server configuration missing?

2
  • You run reindex command ?? Apr 12, 2020 at 18:29
  • Yes I have run reindex but not working Apr 13, 2020 at 4:45

1 Answer 1

1

I have two possibilities to image not visible in front If the issue in permission then images not visible in front. Which do you think server issue then check below two possibilities. I have mentioned all the information, And Yes, My suggestion you again fire this command

php bin/magento catalog:image:resize

you need to run reindex command php bin/magento index:reindex. After completed reindex run php bin/magento cache:flush

  1. Image is visible in Magento admin backend, but not visible in customer frontend Possible reason 1: You have wrong permissions on your /media/ folder

Solution: Ensure you have writable permissions on this folder. Change permissions to 777 recursively. You can do it using SSH via this command (execute it in Magento directory):

chmod -R 777 media/

Possible reason 2: Media folder is owned by another user. It can happen if you transfer your Magento store from one server to another Solution: Change ownership of the /media/ folder:

chown -R {username}:{username} media/

Important: Make sure that the folder owner is the same user as your web server user. If you are not sure, contact your server support administrator.

Possible reason 3: Magento cannot resize images due to low PHP memory limit. Magento resize images using GD library, however, if there is no sufficient amount of memory for such operation Magento will return a placeholder image Solution: Increase your memory limit. You should open your .htaccess file and find this string:

php_value memory_limit 256M

Make sure that this value is at least 256M, or better 512M.

Possible reason 4: The GD library is not installed/configured Solution: Make sure that your hosting installed GD library on your server, you can check it using php info.

https://www.php.net/manual/en/function.phpinfo.php

Possible reason 5: Wrong attribute scope for small_image, thumbnail, base_image. Sometimes Magento processes images incorrectly if they have scope=Store View (especially in case of multi-store installation)

Solution: You should open your Magento backend > Catalog > Attributes > Manage attributes. After this, you should find an image, small_image & thumbnail attributes. Make sure that all these attributes have scope = Global.

Possible reason 6: Problem with safe mode

Solution: It is not recommended to disable safe mode, but if you tried all other solutions you might try to disable safe mode on your server

  1. Images is not displaying in Magento backend This can be caused by wrong permissions set to uploaded files. Open lib/Varien/File/Uploader.php and make sure following permission are set:

Around line 219:

chmod($destinationFile, 0666);

Around line 541:

if (!(@is_dir($destinationFolder) || @mkdir($destinationFolder, 0777, true))) {

Note: This issue can also be fixed by applying patch SUPEE-7405 v1.1.

Hope this helps!

Your Answer

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

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