Magento Tutorials

Magento images not showing up in admin or in frontend

If you are using Magento platform for your e-commerce website, sooner or later you definitely may encounter the not showing image issue.

But don’t you worry. If you know the reason, you will handle this issue easily.

Note: To learn more about Magento, please read our exclusive tutorials here.

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

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

2. 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!

Further Reading:

A Beginner Guide To Magento 2 File Permissions

How to Configure Image Sizes in Magento

Upload Images for Configurable Swatches in Magento

How to Resize Images in Magento 1 & 2

Is it helpful?


A knowledge craver who always strive to be wiser everyday.

Notify of
Inline Feedbacks
View all comments