<daff-image>
uses the native HTML <img>
tag to place responsive images on a page. It helps to prevent content jumping while images are loading.
The alt
, width
, and height
attributes must be defined. If they are not defined, errors will appear.
width
and height
are necessary to calculate the aspect ratio of an image, used for the aspect ratio padding trick that helps to prevent content jumping while images are loaded.
This error appears when <daff-image>
is missing an alt
attribute. The alt
tag specifies an alternate text for an image.
This error appears when <daff-image>
is missing a width
attribute. The width must be defined in order to correctly calculate the aspect ratio of the image.
This error appears when <daff-image>
is missing a height
attribute. The height must be defined in order to correctly calculate the aspect ratio of the image.
<daff-image src="/assets/card/uber-logo.svg" alt="Uber Logo" width="300" height="119"></daff-image>