How to add a theme preview?

I have created a custom theme. And I want a preview of the theme to be displayed automatically when it have been installed (just like the default Shopware theme).

Created a image with the same size as the one for the default theme. Also, added it to:
myThemePlugin > src > Resources >app > storfront > src > assets
The name is „aliceThemePreview.jpg“

Zipped the custom theme „myThemePlugin“ folder and installed on another Shopware store (locally). But no theme preview… :roll_eyes:

How is this done?

I also followed the manual on how to Add custom assets, but that did not seems to work either. :thinking:

/ Magnus

Lowercase: your-theme-name-preview.jpg/png in the config folder.

Thanks @Max_Shop
But I don’t get it how this will work. Do you mean this config folder (see image). But when I zip my plugin, it will not contain the preview file. :thinking:

I have the development version of Shopware installed, and trying to „reverse engineer“ how Shopware have done it…

The name of the theme is „AliceRed22“

@Max_Shop I have solved it! :grinning:
And, if anyone else wonder how to do it:

  1. Add your theme preview file in the folder „YourPlugInFolder > src > Resources > app > storefront > src > assets“

  2. Add this line to your theme.json file:
    „previewMedia“: „app/storefront/src/assets/alicered22-preview.jpg“,
    after the description block. Change the file name to your file.

/ Magnus