Placeholder SVG Tag
Generates an HTML <img> tag for a placeholder illustration. Use it where a section has no product, collection or image to show yet.
Parameters
- The filter is applied to a placeholder name.
- The first parameter is the
classof the tag. It isplaceholder-svgby default.
Names
| Name | Size |
|---|---|
product-1 to product-5 | 512 × 512 |
collection-1 to collection-3 | 512 × 512 |
hero-1 to hero-3 | 1600 × 500 |
image | 512 × 512 |
- Product and collection names have a version with no background: add
-transparent, for exampleproduct-1-transparent. - Hero names have a mobile version: add
-mobile, for examplehero-1-mobile(500 × 250). - An unknown name gives the
imageplaceholder.
Example
liquid
{%- if block.settings.product -%}
{% render 'product-card', product: block.settings.product %}
{%- else -%}
{{ 'product-1' | placeholder_svg_tag: 'card-image' }}
{%- endif -%}Output