So I understand the standard way to generate img tags in Shopify theme liquid file is:
{{
product
| image_url: width: 1946
| image_tag:
class: image_class,
loading: lazy,
sizes: sizes,
widths: '246, 493, 600, 713, 823, 990, 1100, 1206, 1346, 1426, 1646, 1946'
}}
But I want to generate an img tag based on my own url, I tried
{{
'https://my-domain.com/my-image.jpg'
| image_tag:
class: image_class,
loading: lazy,
sizes: sizes,
widths: '246, 493, 600, 713, 823, 990, 1100, 1206, 1346, 1426, 1646, 1946'
}}
but it throws an error “Liquid error: input to image_tag must be an image_url”. While I can manually create an img tag but I want to do it in a more decent way.