3

I just following this tutorial https://jamersan.com/lets-get-started-theming-magento-2-part-1/ , in this tutorial I learn about how to make Magento Theme, but unfortunately I unable to show Theme Preview Image.

enter image description here

When my previous Themes is having it:

enter image description here

theme.xml (myshop/app/design/frontend/MyCompany/default/theme.xml)

enter image description here

The Image enter image description here

Database Table

Missing preview_image field value

I am curious why the preview image does not show on my theme info page ?

Any help about it extremely appreciated

1

Theme Preview image loads from app/design/vendor/theme_directory/theme.xml file

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

If this media tag and path to the image is not specified theme preview image will not be loaded. You can follow this link to learn about Magento 2 Themes and Theme creation https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-overview.html

  • I already have that file and configured well, but unfortunately the preview is not there yet – Yusuf Ibrahim Apr 30 at 9:23
  • Can you please share your code – Raj Mohan R Apr 30 at 9:24
  • I have updated the question above – Yusuf Ibrahim Apr 30 at 9:26
  • So where you have placed your preview image – Raj Mohan R Apr 30 at 9:29
  • it's here myshop/app/design/frontend/MyCompany/default/media/preview.png – Yusuf Ibrahim Apr 30 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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