# Import über Plugin / DAL

**URL:** <https://forum.shopware.com/t/import-uber-plugin-dal/62391>\
**Category:** Programmierung\
**Created:** [15. Oktober 2019 um 14:53 UTC](https://forum.shopware.com/t/import-uber-plugin-dal/62391 "2019-10-15T14:53:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ottscho](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ottscho](https://forum.shopware.com/u/ottscho)\
**Post date:** [15. Oktober 2019 um 14:53 UTC](https://forum.shopware.com/t/import-uber-plugin-dal/62391/1 "2019-10-15T14:53:06Z")

</div>

Hallo liebe Community,

ich teste zur Zeit den Weg eines Artikelimports über ein Shopware Plugin / DAL.

Artikel, Kategorie, Eigenschaften etc. habe ich bereits und klappt auch alles.  
Mit den Bilder / MediaService tue ich mich im Moment etwas schwer. Hat damit bereits jemand was gemacht?  
Ich finde in den DEVs auch kein Beispiel. Ziel ist es, das Bild über eine local file:// URL zu holen und dem Artikel zu hinterlegen.

Später muss noch geprüft werden A) is das Bild bereits vorhanden und B) ist das Bild unter file:// neuer als das in Shopware.

Beste Grüße  
Ottscho

&nbsp;

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [15. Oktober 2019 um 15:04 UTC](https://forum.shopware.com/t/import-uber-plugin-dal/62391/2 "2019-10-15T15:04:44Z")

</div>

Hi ottscho,

der Migrationsassistent macht ja genau das auch, hier könntest du dir das mal anschauen:

[https://github.com/shopware/SwagMigrationAssistant/blob/master/Profile/Shopware/Media/LocalMediaProcessor.php](https://github.com/shopware/SwagMigrationAssistant/blob/master/Profile/Shopware/Media/LocalMediaProcessor.php)

Wenn dein Import eigentlich eine Migration ist, kannst du natürlich auch die Logik des Migrationsassistenten nutzen und ein eigenes Profil dafür schreiben.

Gruß

Krispin
