Normally you do not want the image styles to be exported in config, because they should be generated as needed. Also on sites with that show lots of images in different sizes this would clutter up the config directory.

The best solution would be to ignore all these image styles on an import. Ignoring those in the sync directory and ignoring those already present on the site.
Maybe the config_split module could help here?

Comments

weseze created an issue. See original summary.

weseze’s picture

Title: Prevent config export for the generated image styles » Prevent config for the generated image styles from being deleted in config import
Issue summary: View changes
weseze’s picture

Version: » 8.x-1.0-rc5
Status: Active » Closed (works as designed)

Best way forward here is to use the config_split module and add "image.style.drimage*" to the blacklist. Also see the same problem in webform module: #2931104: How to prevent config import from deleting webforms on a target site if they don't exist in code?