Image API

API reference docs for theImagecomponent. For examples and details on the usage of this component, visit the component demo page.

Props

PropTypeDescriptionDefault
altstringDefines an alternative text description of the image._
srcstringThe image URL._
decoding?'sync' | 'async' | 'auto'Indicates how the image is decoded._
height?string | numberThe intrinsic height of the image._
loading?'eager' | 'lazy'Defines if the image should load immediately or defer until it is in view._
sizes?stringA set of source size descriptors for the image for responsive behavior._
srcSet?stringOne or more image source URLs for different resolutions._
width?string | numberThe intrinsic width of the image._
onError?(event: React.SyntheticEvent<HTMLImageElement, Event>) => voidThe intrinsic width of the image._