Media
Media
Images work today. Video, YouTube, Vimeo and iframes are planned.
- ImagesSupported
Any format the browser decodes. Pass a preview source to open instantly and a larger one to zoom into.
- Video filesPlanned
MP4 and WebM with a poster frame, paused when you page away.
- YouTube and VimeoPlanned
Embedded players that load only when their page is shown.
- IframesPlanned
Any page you trust, such as a map or a 3D view, inside a slide.
Today
Pass image items: src, alt, an optional caption, a smaller previewSrc and the natural size. The API page lists every method.
Planned item shape Planned
A sketch of what a video item may look like. It does not work in the current release.
// Planned. Not in the current release, and the shape may change.
lightbox.open([
{
type: "video",
src: "/clips/marbling.mp4",
poster: "/prints/coral-sky-800.webp",
width: 1920,
height: 1080,
caption: "Ink settling on the water",
},
]);