<img src="https://upload.wikimedia.org/wikipedia/commons/5/54/De_Alice%27s_Abenteuer_im_Wunderland_Carroll_pic_23_edited_1_of_2.png" alt="The Cheshire Cat" />
<img src="{{ src }}" alt="{{ alt }}"
{{#if srcset}}srcset="{{ srcset }}"{{/if}}
{{#if sizes}}sizes="{{ sizes }}"{{/if}} />
{
"src": "https://upload.wikimedia.org/wikipedia/commons/5/54/De_Alice%27s_Abenteuer_im_Wunderland_Carroll_pic_23_edited_1_of_2.png",
"alt": "The Cheshire Cat"
}
img {
max-width: 100%;
}
Images must have a src
but ideally would also have srcset
and sizes
attributes to define a set of image sources for the browser to choose from.
See srcset
and sizes
here MDN Img Element