diff --git a/theme-development.md b/theme-development.md index 5c810fa..2ecd4e3 100644 --- a/theme-development.md +++ b/theme-development.md @@ -59,10 +59,31 @@ ComponentRegistrar::register( ); ``` -4. To load the new theme, run the command `php bin/magento setup:upgrade`. +4. To load the new theme, run the command `bin/magento setup:upgrade`. Your custom theme is now ready to be customized and extended as per your requirements. +## Define a Preview Image (Optional) + +You can specify a preview image for your theme using the following XML configuration in your `theme.xml`: + +```xml + + MyTheme + Magento/blank + + media/preview.jpg + + +``` + +Ensure that the specified image file exists in your theme directory. If it doesn't, running `bin/magento setup:upgrade` will produce an error: + +``` +File "app/design/frontend/Acme/MyTheme/media/preview.jpg" does not exist. +``` + ## Theme Inheritance Magento 2 supports theme inheritance, allowing you to extend and customize existing themes. This reduces duplication and