سؤال

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

هل كانت مفيدة؟

المحلول

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 was able to fix that issues by deleting "design/theme/theme_id" from core_config_data table, and by deleting theme record in theme table as well. After that, I just activated theme again and thus, there is an image preview.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top