TextWithImage block renders a two-column split: a Portable Text content area on one side and an image on the other. The imagePosition field controls which side the image appears on. LQIP (low-quality image placeholders) are supported for smooth lazy-loading.
Props
string
Optional heading above the body copy, rendered as
<h2> at 3xl–4xl with tight tracking.PortableTextBlock[]
Portable Text body copy rendered with the project’s shared
portableTextComponents. Styled as prose with text-muted-foreground.SanityImageObject
Sanity image with hotspot enabled. Cropped to
800×600 (4:3 aspect ratio). The alt field on the image object is required for accessibility.'left' | 'right'
Controls which side the image occupies. Defaults to
right. When set to left, the image uses @lg:order-first to prepend it in the column order.'white' | 'light' | 'dark' | 'primary'
Background colour token. Defaults to
white.'none' | 'small' | 'default' | 'large'
Vertical padding override. Defaults to
default.'narrow' | 'default' | 'full'
Content container max-width. Defaults to
default.string
Additional CSS classes.
string
HTML
id for anchor targeting.Usage in Sanity Studio
- Add a Text with Image block to a page.
- Set an optional Heading.
- Write the Content body copy using the Portable Text editor.
- Upload an Image and fill in the required Alternative Text field.
- Expand Layout Options and set Image Position to
leftorright(defaultright).
Variants / Options
Novariant field. The two layout options are: