Image Carousel

Add multiple images in a carousel

Last modified: March 14, 2026

link Block names

t2/image-carousel, t2/image-carousel-image

link Properties (t2.json)

link

icons

link

features

link

features.aspect-ratio

link Style properties

link Image sources

The block supports three mutually exclusive image sources, selected via "Image source" in the sidebar. Switching source never clears data from the other modes.

link Media library (default)

Images are picked from the WordPress media library. Each image is stored with its attachment id and url. This is the original behaviour and is fully unchanged.

link External URLs

Images are entered as plain URLs in the sidebar, one per image entry. Each entry also has optional Alt text and Caption fields. No media library modal is shown.

The externalImages attribute stores the list:

[
  { "url": "https://example.com/photo.jpg", "alt": "A photo", "caption": "Photo caption" }
]

link Post meta

Images are read from a post meta field at render time. The meta field must contain an array of URL strings. Both native PHP serialised arrays (already decoded by WordPress) and JSON-encoded strings (e.g. stored via json_encode / JSON.stringify) are supported.

Select the meta key from the dropdown in the sidebar — only meta keys whose value is an array are listed. No media library modal is shown.

The metaKey attribute stores the chosen meta key name:

{ "metaKey": "vehicle_picturesPaths" }

Example meta value (either format is accepted):

["https://example.com/img1.jpg", "https://example.com/img2.jpg"]

link Hooks