# Eigenes Einkaufswelt-Plugin mit Image-Element

**URL:** <https://forum.shopware.com/t/eigenes-einkaufswelt-plugin-mit-image-element/55559>\
**Category:** Programmierung\
**Created:** [4. Oktober 2018 um 12:06 UTC](https://forum.shopware.com/t/eigenes-einkaufswelt-plugin-mit-image-element/55559 "2018-10-04T12:06:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![biceps](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/biceps/32/23962_2.png) [@biceps](https://forum.shopware.com/u/biceps)\
**Post date:** [4. Oktober 2018 um 12:06 UTC](https://forum.shopware.com/t/eigenes-einkaufswelt-plugin-mit-image-element/55559/1 "2018-10-04T12:06:10Z")

</div>

Hallo, ich möchte ein eigenes Einkaufswelt-Plugin erstellen, was auch bei den Texten sehr gut funktioniert. Allerdings wird bei dem Bild-Element nach dem zweitenmal speichern der Einkaufswelt der Pfad des Bildes überschrieben. Weiß einer von euch, woran das liegt? Weiter unten findet ihr meinen jetzigen Code-Abschnitt&nbsp;im Main-File.

```
public function createEmotionComponent()
{
    /** @var \Shopware\Components\Emotion\ComponentInstaller $installer */
    $installer = $this->container->get('shopware.emotion_component_installer');

    $component = $installer->createOrUpdate(
        $this->getName(),
        'Instagram Profil',
        [
            'name' => 'Instagram Profil',
            'template' => 'instagram_emotion',
            'xtype' => 'instagram-emotion',
            'cls' => 'instagram-emotion',
        ]
    );

    $component->createTextField([
        'name' => 'title',
        'fieldLabel' => 'Titel',
        'allowBlank' => true
    ]);
    
    $component->createMediaField([
		'name' => 'image',
		'fieldLabel' => 'Profilbild',
		'valueField' => 'virtualPath'
	]);
}

```

&nbsp;

Ich freue mich über jede Hilfe / Anregung.&nbsp;
