# Plugin Theme Logo mit/als Asset einbinden

**URL:** <https://forum.shopware.com/t/plugin-theme-logo-mit-als-asset-einbinden/105497>\
**Category:** Shopware 6 (German)\
**Created:** [14. Oktober 2024 um 12:28 UTC](https://forum.shopware.com/t/plugin-theme-logo-mit-als-asset-einbinden/105497 "2024-10-14T12:28:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [14. Oktober 2024 um 12:28 UTC](https://forum.shopware.com/t/plugin-theme-logo-mit-als-asset-einbinden/105497/1 "2024-10-14T12:28:37Z")

</div>

Wie bekomme ich das Logo eines Shop als Asset in ein Plugin-Theme eingebunden.

Diese Dateispeicherordner habe ich schon ausprobiert:

- ./custom/plugins/ThemeName/src/Resources/public/
- ./custom/plugins/ThemeName/src/Resources/app/storefront/src/assets/
- ./custom/plugins/ThemeName/src/Resources/app/storefront/src/assets/logo
- ./custom/plugins/ThemeName/src/Resources/app/storefront/dist/assets/
- ./custom/plugins/ThemeName/src/Resources/app/storefront/dist/assets/logo

Das steht in meinem theme.json

```auto
{
  "name": "xxx",
  "author": "Shopware AG",
  "views": [
     "@Storefront",
     "@Plugins",
     "@xxx"
  ],
  "style": [
    "app/storefront/src/scss/overrides.scss",
    "@Storefront",
    "app/storefront/src/scss/base.scss"
  ],
  "script": [
    "@Storefront",
    "app/storefront/dist/storefront/js/xxx/xxx-theme.js"
  ],
  "asset": [
    "@Storefront",
    "app/storefront/src/assets"
  ],
  "config": {
    "fields": {
      "sw-color-brand-primary": {
        "label": {
          "en-GB": "Primary color",
          "de-DE": "Primaerfarbe"
        },
        "type": "color",
        "value": "#f28d1f"
      },
      "sw-logo-desktop": {
        "label": {
          "en-GB": "Desktop Logo",
          "de-DE": "Desktop Logo"
        },
        "type": "media",
        "value": "app/storefront/src/assets/logo/xxx-logo-desktop.png"
      },      
      "sw-logo-tablet": {
        "label": {
          "en-GB": "Tablet Logo",
          "de-DE": "Tablet Logo"
        },
        "type": "media",
        "value": "app/storefront/src/assets/logo/xxx-logo-desktop.png"
      },
      "sw-logo-mobile": {
        "label": {
          "en-GB": "Mobile Logo",
          "de-DE": "Mobile Logo"
        },
        "type": "media",
        "value": "app/storefront/src/assets/logo/xxx-logo-mobile.png"
      }
    }
  }
}

```

Dann waren da leere MediaObjecte im Backend unter den Theme einstellungen, habe die gelöscht. Und jetzt kommt innerhalb vom picture-Element gar nichts… einfach leer HTML.

Klar habe ich auch das hier ausgeführt.

- assets:install (da landen die Bilder auch im [EDIT]: theme/123abc/assets/logo)
- theme:compile
- cache:clear

Wie binde ich korrekt ein?  
Danke und Gruss

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [18. Oktober 2024 um 06:15 UTC](https://forum.shopware.com/t/plugin-theme-logo-mit-als-asset-einbinden/105497/2 "2024-10-18T06:15:48Z")

</div>

Hat denn jemand schon einmal ein logo in den assets platziert?  
Wenn ja, wie hast du das gemacht?

Danke und Gruss

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [30. Oktober 2024 um 08:57 UTC](https://forum.shopware.com/t/plugin-theme-logo-mit-als-asset-einbinden/105497/3 "2024-10-30T08:57:39Z")

</div>

**bin/console theme:refresh** importiert das Bild in den Theme-Ordner vom Backend.

Allerdings wird das Bild nicht als Logo genommen.

Hat jemand ein Beispiel wie es funktioniert?

```auto
{ ....
  "config": {
    "fields": {
      "sw-logo-desktop": {
        "label": {
          "en-GB": "Desktop Logo",
          "de-DE": "Desktop Logo"
        },
        "type": "media",
        "value": "app/storefront/src/assets/logo/xxx-logo.png"
      }
    }
  }
}

```

Danke und Gruss
