Skip to content

Commit

Permalink
Improve loading performance, add native lazy loading, async decoding,…
Browse files Browse the repository at this point in the history
… change format to webp
  • Loading branch information
michsko544 committed May 20, 2024
1 parent 8bed27d commit 5a6e88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snippets/product-card.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="{{product.url}}" class="{{pre}}__card">
<div class="{{pre}}__product">
<div class="{{pre}}__image-wrapper">
{{product.featured_image | image_url: width: 336 | image_tag: widths: '200, 336'}}
{{product.featured_image | image_url: width: 336, format: 'webp' | image_tag: widths: '200, 336', loading: 'lazy', decoding: 'async', fetchpriority: 'low' }}
{% if product.compare_at_price_max > product.price %}
<div class="{{pre}}__chips">
<span class="{{pre}}__chip {{pre}}__chip--sale">{{product.compare_at_price | minus: product.price | times: 100 | divided_by: product.compare_at_price }}% zniżki</span>
Expand Down

0 comments on commit 5a6e88e

Please sign in to comment.