# foreach um \<meta itemprop....\> liefert das erste Bild nicht aus?

**URL:** <https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622>\
**Category:** Allgemein\
**Created:** [8. Februar 2021 um 15:24 UTC](https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622 "2021-02-08T15:24:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunnar](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gunnar](https://forum.shopware.com/u/Gunnar)\
**Post date:** [8. Februar 2021 um 15:24 UTC](https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622/1 "2021-02-08T15:24:15Z")

</div>

Hallo!  
kann jemand bestätigen, dass die foreach Schleife in&nbsp;[shopware/header.tpl at de7f731a4ad6e0c80838dd6e32838f011d4347a1 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/de7f731a4ad6e0c80838dd6e32838f011d4347a1/themes/Frontend/Bare/frontend/detail/content/header.tpl#L14)  
das erste Bild nicht ausgibt?  
Mir ist das in der Google Search Console aufgefallen, wenn es nur ein Bild gibt, dann meckert Google das fehlende Bild an.  
Leider habe ich im Forum und bei Google nichts dazu gefunden.

Es passiert in 2 verschiedenen Shops (also keine Subshops).

Gruß  
Gunnar  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Gunnar](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gunnar](https://forum.shopware.com/u/Gunnar)\
**Post date:** [8. Februar 2021 um 15:30 UTC](https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622/2 "2021-02-08T15:30:08Z")

</div>

Ups, sorry, das HTML im Betreff mag das Forum nicht.

---

<div class="post-metadata">

**Author:** ![Gunnar](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gunnar](https://forum.shopware.com/u/Gunnar)\
**Post date:** [8. Februar 2021 um 15:30 UTC](https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622/3 "2021-02-08T15:30:27Z")

</div>

Oh man^^

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [8. Februar 2021 um 15:43 UTC](https://forum.shopware.com/t/foreach-um-meta-itemprop-liefert-das-erste-bild-nicht-aus/72622/4 "2021-02-08T15:43:59Z")

</div>

Grad mal mit dem Profiler in einen Artikel geguckt:  
Das Artikel-Hauptbild ist in&nbsp;$sArticle.image,&nbsp;die WEITEREN in&nbsp;$sArticle.images  
Somit kann die Schleife in der Tat an dieser Stelle keine Meta-Info für das erste - das Hauptbild - ausgeben.

Für das erste Bild gibt es aber im header einen opengraph-meta:  
[shopware/header.tpl at 5.7 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/5.7/themes/Frontend/Bare/frontend/detail/header.tpl#L13)
