Solved: Media Gallery Doesn’t Show Any Images in Magento 2.4.1
Magento 2.4.1 was released on October 15, ’20 to offer enhanced security and performance of the online store.
Did you already download the Magento 2.4.1 version and install it?
If yes, did you face the issue of the media gallery not showing any images?
If yes again, here’s the solution for the same.
However, first, make sure that the “Media Gallery” is set to “Yes” from the backend at Stores > Configuration > Advanced > System > Media Gallery.
In the Magento 2.4.1 version, the media.gallery.synchronization
and media.content.synchronization
queue consumers need to be started for initial synchronization.
If not, the media gallery doesn’t show any images in Magento 2.4.1 as shown below:
To resolve it, follow the below steps:
Solution: Media Gallery Doesn’t Show Any Images in Magento 2.4.1
Run the below command in console:
1 |
php bin/magento media-gallery:sync |
1 |
php bin/magento media-content:sync |
That’s it.
You can see that now the media gallery displays the images:
Any doubts about this error can be mentioned in the Comments section below. I’d be happy to help.
Please share the solution with Magento Community via social media.
Thank you.
4 Comments
Hi,
Iam upgrading Magento 2.2 to 2.4.6 added the DB and run setup upgrade command but getting the below message
“System config was processed
Media files stored outside of ‘Media Gallery Allowed’ folders will not be available to the media gallery.
Please refer to Developer Guide for more details.”
and also not getting images in the pub folder and not showing images in the admin and also in frontend but I have the image sin the DB,
my question is why Iam getting the above message when Iam running setup:upgrade command and why Iam not getting the images in the pub folder, frontend and in admin
I gave all the permissions to the pub folder and proper user group also I gave.
Iam using the docker
php 8.1 composer 2.2 magento 2.4.6
Hey Banoth,
In Magento 2.4 the media path for pub folder has became root so,
please check your path accordingly and do let us know.
Thank You!
hi,
I tried to execute above commands but getting this error:
————————————————————————————————————-
libpng warning: Interlace handling should be turned on when using png_read_image
In Synchronize.php line 83:
Failed to execute the following synchronizers: media_gallery_asset_synchronizer
media-gallery:sync
————————————————————————————————————-
Please suugest on this.
Hello Chitrangada,
In your image directory you can run the command like following:
find . -iname ‘*.png’ -execdir convert {} -interlace none {} \;
Thank You