I created theme.xml with content below: (at: app/code/design/frontend/Vendor/theme_directory/theme.xml
)
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>mytheme</title> <!-- your theme's name -->
<parent>Magento/luma</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
<media>
<preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
</media>
</theme>
and despite I have “preview.jpg” at app/code/design/frontend/vendor/theme_directory/media/preview.jpg
, it is not showing in admin.
3
Answers
Your Path is already Wrong. So, it’s Not Getting on them.
Please check below path:
Theme Preview image loads from app/design/vendor/theme_directory/theme.xml file
put image on
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
You can check-in here: Magent2 Theme Overview
I was able to fix that issues by deleting "design/theme/theme_id" from
core_config_data
table, and by deleting theme record fromtheme
table as well. After that, I just activated theme again and thus, there is an image preview.