Skip to content

Commit

Permalink
Added: Custom lazy load classes to picture component
Browse files Browse the repository at this point in the history
  • Loading branch information
bymayo authored Oct 5, 2020
1 parent aa91558 commit 5c82a2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/_components/picture.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
data-srcset="{{ craft.imager.srcset(pictureTransform) }}"
data-sizes="100vw"
alt="{{ alt ?? image.title }}"
class="js-lazy-load{% if imgClass is defined %} {{ imgClass }}{% endif %}"
class="lazy-load js-lazy-load{% if imgClass is defined %} {{ imgClass }}{% endif %}"
{% if focalPoint %} style="object-position: {{ image.hasFocalPoint ? image.getFocalPoint()|first * 100 : '10' }}% {{ image.hasFocalPoint ? image.getFocalPoint()|last * 100 : '50' }}%"{% endif %}
>
{% else %}
Expand Down

0 comments on commit 5c82a2a

Please sign in to comment.