ResponsiveImageProps
Index
Properties
optionalalt
Alternate text description of the image. If set and the given image is a Starlight media object, it will be used in place of the image’s alternative text set in Starlight.
optionalbackground
Defines the background color of the image while it loads. It accepts any
CSS color, including transparent
. Defaults to the color generated by
Starlight when the image was uploaded, or transparent when the given image
is a URI string.
optionalclassName
image
The image to render. It should be a URI string or the object returned by Starlight on a Media File field. Required.
optionallazyRoot
Defines the scrollable parent of the image. Set this to the nearest scrollable HTMLElement parent of this image if lazy-loading is not working. See the MDN documentation on IntersectionObserver.root to learn more.
optionallazyRootMargin
Defines how close to the viewport an image has to be to start loading. See the MDN documentation on IntersectionObserver.rootMargin to learn more. Defaults to 200px.
optionalsizes
An HTML
sizes
attribute. If provided, the browser will render the
best fit image size variation to the current viewport size. See
the MDN documentation on the sizes property
to learn how to configure this attribute.optionalvariation
Defines which image variation will be rendered. Defaults to optimized
.
Props accepted by the ResponsiveImage component.