<img>
tag with Bolt styles. All that's required to make a <bolt-image>
are the src
and alt
attributes.
<bolt-image src="/images/placeholders/16x9.jpg" alt="A Rock Climber"></bolt-image>
srcset
and sizes
to <bolt-image>
for responsive images.
<bolt-image src="/images/placeholders/16x9.jpg" sizes="auto" alt="A Rock Climber"></bolt-image>
ratio
attribute with the image's aspect-ratio as slash-separated values, e.g. "4/3" or "400/300".
<bolt-image src="/images/placeholders/16x9.jpg" alt="A Rock Climber" ratio="4/3"></bolt-image>
no-lazy
attribute.
<bolt-image src="/images/placeholders/16x9.jpg" alt="A Rock Climber" no-lazy></bolt-image>
placeholder-image
and placeholder-color
where "image" is an image path and "color" is a valid CSS background-color. Note: the ratio
attribute must be provided for placholder image or color to display.
<bolt-image src="/images/placeholders/16x9.jpg" alt="A Rock Climber" ratio="4/3" placeholder-color="#D3D3D3" placeholder-image="/images/placeholders/16x9.jpg"></bolt-image>