Commit 63fe8ec7 authored by Michael Apfelthaler's avatar Michael Apfelthaler

Use srcset on Themen Images

parent b6424e62
...@@ -11,8 +11,14 @@ ...@@ -11,8 +11,14 @@
</a> </a>
</h3> </h3>
<div class="wm-card__media "> <div class="wm-card__media ">
<img class="wm-image wm-card__image" loading="lazy" src="{{ craft.app.sites.primarySite.baseUrl}}/{{image.url}}" width="350" {% do image.setTransform({ height: 300 }) %}
height="197" data-src="" alt="Bildbeschreibung"> {{ tag('img', {
src: image.url,
width: image.width,
height: image.height,
srcset: image.getSrcset(['1.5x', '2x', '3x']),
alt: image.title,
}) }}
</div> </div>
<div class="wm-card__content wm-rich-text "> <div class="wm-card__content wm-rich-text ">
{{ newsElement.teaser }} {{ newsElement.teaser }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment