Blog

Preview image for custom theme is not showing on the admin Magento2

Are you facing issue of not displaying Preview Image for custom theme in admin Magento2?

Make sure that you have mentioned media tag in the theme.xml file of your theme as shown below:

<media>
    <preview_image>media/preview.jpg</preview_image>
</media>

Then you have image preview.jpg in your custom theme app/design/frontend/[vendor]/[themename]/media/.

Even though, it is not displaying then follow the following steps:-

Step 1:

In MySQL, run the below command:

SELECT * FROM core_config_data WHERE path LIKE '%design/theme/theme_id%';

If you get the output, delete this record.

Step 2:

In MySQL, delete the record of your custom theme from theme table.

Step 3: Apply Theme in Admin Panel

Apply your custom theme in Admin Panel : – Content->Configuration-> Edit the record.

Now, go to the Admin Panel : – Content->Themes, you will see Preview Image has been loaded.

That’s it. !!

Your feedback is always welcome.

Leave a Reply

Your email address will not be published. Required fields are marked *