Image

A responsive image, optionally wrapped in a link.

A responsive image, optionally wrapped in a link.

PropTypeDefaultDescription
srcrequiredurl—Image URL (use an absolute, hosted URL).
altstring—Alternative text (shown if the image can't load).
hrefurl—Make the image a link to this URL.
widthnumber—Container (frame) width in px. The image scales to fill it; defaults to full content width.
heightnumber—Optional frame height in px. By default the height adapts to the image's aspect ratio — set this to pin an explicit height.
objectFitenumcover | contain | fill—How the image fills the frame when a height is set: cover (crop), contain (letterbox), or fill (stretch). Client support varies.
backgroundColorcolor—Frame background shown around the image when “contain” leaves gaps.
borderRadiusnumber—Corner rounding in px.
alignenumleft | center | rightcenterHorizontal alignment.
borderWidthnumber—Frame border stroke width (px).
borderStyleenumsolid | dashed | dotted—Frame border stroke style.
borderColorcolor—Frame border stroke color.

Common props

Every component accepts these on top of its own props.

PropTypeDefaultDescription
marginBottomnumber16Vertical space (px) below the block.
classNamestring—Tailwind-style utility classes compiled to inline CSS at render (e.g. "mt-4 text-zinc-500 sm:hidden"). Responsive/pseudo variants are hoisted into a <style> block. class and tw are accepted as aliases in code.
customCsscss—Extra inline CSS declarations merged onto the block's root element (e.g. "letter-spacing: 1px; opacity: 0.9"). Inlined so it survives every client.

Set one side at a time with the padding and margin objects in the visual editor's inspector.

Search docs and guides

Search the docs and product guides.