Last active
July 29, 2019 09:38
-
-
Save shopifypartners/5ec96063cfaba7cffaa5b98aa209530f to your computer and use it in GitHub Desktop.
Lazyloading responsive image - https://www.shopify.com/partners/blog/lazy-loading
This file contains 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
<img id="Image-{{ image.id }}-{{ responsive_image_counter }}" | |
class="responsive-image__image lazyload {{ image_class }}" | |
src="{{ image | img_url: '300x' }}" | |
data-src="{{ img_url }}" | |
data-widths="[{{ image_widths }}]" | |
data-aspectratio="{{ image.aspect_ratio }}" | |
data-sizes="auto" | |
tabindex="-1" | |
alt="{{ image.alt | escape }}" | |
{{ image_attributes }} | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment