Image

A component for displaying responsive images in email templates. Handles image scaling, alignment, and linking while maintaining compatibility across email clients.

<Image
  src="https://example.com/image.jpg"
  alt="Description"
  width="600px"
  fluidOnMobile="true"
  borderRadius="8px"
/>
PropTypeDefaultUnitDescription
alignleft|center|rightcenter-Horizontal alignment of the image
altstring-Alternative text for the image
borderstringnoneCSS border valueBorder shorthand for all sides
borderBottomstringnoneCSS border valueBottom border style
borderLeftstringnoneCSS border valueLeft border style
borderRadiusstring-pxBorder radius for corners
borderRightstringnoneCSS border valueRight border style
borderTopstringnoneCSS border valueTop border style
classstring--CSS class name(s) for custom styling*
containerBackgroundColorstring-CSS color valueBackground color of image container
fluidOnMobiletrue--Whether image is full-width on mobile
heightstringautopx/autoImage height
hrefstring-URLURL the image links to
namestring--Name attribute for the image
paddingstring10px 25pxpxPadding shorthand for all sides
paddingBottomstring-pxBottom padding
paddingLeftstring-pxLeft padding
paddingRightstring-pxRight padding
paddingTopstring-pxTop padding
relstring--Relationship attribute for the link
srcstring-URLSource URL of the image
srcsetstring--Srcset attribute for responsive images
targetstring_blank-Target attribute for the link
titlestring--Title attribute for the image
usemapstring--Usemap attribute for image maps
widthstring-px/%Image width

* CSS class name(s) that correspond to styles defined in the Head component's styles prop.

  • For best results, host images on a reliable CDN and provide fixed dimensions.
  • Use `fluidOnMobile="true"` to create better mobile experiences by allowing images to stretch full-width on small screens.