Skip to content

Commit eb5deb3

Browse files
author
pumpi
authored
fix: microdata for product images
1 parent a10cec0 commit eb5deb3

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG_de-DE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.21
2+
3+
* Behebt ein Problem mit dem Abruf der Microdaten der Produkt Bilder
4+
15
# 1.0.20
26

37
* Gebe alt- und title-Attribute bei Thumbnails aus, wenn diese beim Bild gespeichert wurden

CHANGELOG_en-GB.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.21
2+
3+
* Fixes a problem with the retrieval of the micro data of the product images
4+
15
# 1.0.20
26

37
* Output alt and title attributes for thumbnails if they were saved with the image in media

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"thumbnail"
1212
],
1313
"description": "This plugins allows you to use variable thumbnails, without having them on storage.",
14-
"version": "1.0.20",
14+
"version": "1.0.21",
1515
"type": "shopware-platform-plugin",
1616
"license": "mit",
1717
"authors": [

src/Resources/views/storefront/utilities/thumbnail.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848
data-aspectratio="{{ ratio }}"
4949
data-parent-fit="contain"
5050
{% endif %}
51-
{% for key, value in attributes %} {{ key }}="{{ value }}"{% endfor %}
51+
{% for key, value in attributes %}
52+
{{ key }}="{{ value }}"
53+
{% if key == 'itemprop' %}
54+
content="{{ media|sw_encode_media_url }}"
55+
{% endif %}
56+
{% endfor %}
5257
{% if inlineStyle is defined %}
5358
style="{{ inlineStyle }}"
5459
{% endif %}

0 commit comments

Comments
 (0)