Forked from shopifypartners/responsive-images-set-up-different-image-sizes.html
Created
February 25, 2022 05:29
-
-
Save admariner/ceb2da944183deeb4621980dfe5faa41 to your computer and use it in GitHub Desktop.
Responsive images: Set up different image sizes – https://www.shopify.com/partners/blog/using-responsive-images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="{{ article.url }}" class="article__grid-image"> | |
<img id="{{ img_id }}" | |
class="article__grid-image lazyload" | |
src="{{ article.image | img_url: '300x300' }}" | |
data-src="{{ img_url }}" | |
data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" | |
data-aspectratio="{{ article.image.aspect_ratio }}" | |
data-sizes="auto" | |
alt="{{ article.image.alt | escape }}"> | |
</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment