Skip to content

Commit

Permalink
Update image.liquid
Browse files Browse the repository at this point in the history
Signed-off-by: Youness Idbakkasse <[email protected]>
  • Loading branch information
blanklob authored Aug 24, 2023
1 parent b6fbb89 commit a0291d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions snippets/image.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% endcomment %}

{% liquid
assign image_class = 'aspect-auto h-auto w-full rounded-sm object-cover ' | append: class
assign class = 'aspect-auto h-auto w-full rounded-sm object-cover ' | append: class
assign alt = alt | default: image.alt | escape

assign priority = 'auto'
Expand All @@ -29,14 +29,14 @@
endif
%}

<picture class="{{ image_class }}">
<picture class="{{ class }}">
{% if image and image != blank %}
{{
image
| image_url: width: image.width
| image_tag:
alt: image_alt,
class: image_class,
alt: alt,
class: class,
widths: '200,300,400,500,600,700,800,1000,1200,1400,1600,1800,2000,2200',
loading: loading,
fetchpriority: priority,
Expand All @@ -50,7 +50,7 @@

<img
role="presentation"
class="{{ image_class }}"
class="{{ class }}"
src="{{ placeholder_image }}"
alt="{{ placeholder_name }}"
width="800"
Expand Down

0 comments on commit a0291d5

Please sign in to comment.