Responsive Image
File:
snippets/responsive-image.liquidUsed in sections:
product-download,product-subscription,product-template
Screenshot not yet added.
Save as
Save as
docs/src/assets/screenshots/snippet-responsive-image.pngDescription
Responsive Image
Renders a responsive image with aspect-ratio padding, max dimension constraints, and lazy loading via Lazysizes. Falls back to a gray placeholder when no image is provided, and includes a noscript fallback.
Features:
- Maintains aspect ratio using padding-top technique
- Lazy loading with Lazysizes
- Configurable max width and height constraints
- Noscript fallback for non-JS environments
Usage
{% render 'responsive-image' %}