Background image cannot be cleared

Due to a known Shopware bug, a theme configuration media field with a default value (e.g. a background image) cannot currently be fully cleared.

Even after removing/deleting the image in the admin UI, the storefront still renders the default value after saving and recompiling the theme. Affected versions: includes Shopware 6.6.10.4 and 6.7.0.0 (as stated in the issue; other versions may be affected as well).

Impact in our demo: The configured background image cannot be unset via the theme configuration at the moment.

If your goal is to stop rendering the background image, override it with CSS:

How to add custom CSS to the theme is documented here.

Workaround 2 (DB workaround, requires database knowledge)

If you need the field to be truly “unset”, you can neutralize the stored config value in the database:

  1. In the theme configuration, set any image once and save.

  2. In the database table themes, select your theme and edit the config_values column:

    • Find the entry for zen-layout-bg-img

    • Remove the stored media ID from the value

  3. Save a single blank space as the value (do not use any other character, otherwise the storefront may produce a 404).

    • Example: "zen-layout-bg-img": {"value": " "}

  4. Reload the Administration (browser refresh).

  5. Save & recompile the theme again.

Last updated