Skip to content

Commit

Permalink
Cumulative Layout Shift
Browse files Browse the repository at this point in the history
  • Loading branch information
Darryn Soper committed Aug 29, 2022
1 parent 8e35663 commit fe4d981
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snippets/card-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
alt="{{ card_product.featured_media.alt | escape }}"
class="motion-reduce"
{% unless lazy_load == false %}loading="lazy"{% endunless %}
width="{{ card_product.featured_media.width }}"
height="{{ card_product.featured_media.height }}"
>

{%- if card_product.media[1] != nil and show_secondary_image -%}
Expand All @@ -71,6 +73,8 @@
alt="{{ card_product.media[1].alt | escape }}"
class="motion-reduce"
loading="lazy"
width="{{ card_product.media[1].width }}"
height="{{ card_product.media[1].height }}"
>
{%- endif -%}
</div>
Expand Down

0 comments on commit fe4d981

Please sign in to comment.