Media Blocks
Media blocks enable you to embed and display rich media content including images, videos, audio files, and interactive elements.Image
Name:core/image
Description: Insert an image to make a visual statement.
Attributes
url(string) - Image source URLalt(string) - Alternative text for accessibilitycaption(rich-text) - Image captionid(number) - Media library attachment IDwidth(string) - Image widthheight(string) - Image heightaspectRatio(string) - Aspect ratio constraintscale(string) - Object-fit value (cover, contain, fill)sizeSlug(string) - Image size (thumbnail, medium, large, full)href(string) - Link URLlinkDestination(string) - Link destination (media, attachment, custom, none)linkTarget(string) - Link target (_blank, _self)rel(string) - Link rel attributelinkClass(string) - Link CSS classfocalPoint(object) - Focal point for croppinglightbox(object) - Lightbox settingstitle(string) - Image title attributeblob(string) - Temporary blob URL during upload
Supports
- Align: left, center, right, wide, full
- Filter: duotone
- Spacing: margin
- Border: color, radius, width
- Shadow: true
- Interactivity: true
Styles
default- Default style (isDefault: true)rounded- Rounded corners
Usage
Gallery
Name:core/gallery
Description: Display multiple images in a rich gallery.
Attributes
images(array) - Array of image objectsids(array) - Array of attachment IDscolumns(number) - Number of columnscaption(string) - Gallery captionimageCrop(boolean) - Crop images to aspect ratiofixedHeight(boolean) - Use fixed height layoutaspectRatio(string) - Aspect ratio for imageslinkTarget(string) - Link target for imageslinkTo(string) - Link destination (none, media, attachment)sizeSlug(string) - Image sizeallowResize(boolean) - Allow individual image resizingrandomOrder(boolean) - Display in random ordernavigationButtonType(string) - Navigation button style
Supports
- Align: left, center, right, wide, full
- Color: background, gradients
- Layout: default
- Spacing: margin, padding, blockGap
- Allowed Blocks: core/image
Usage
Video
Name:core/video
Description: Embed a video from your media library or upload a new one.
Attributes
src(string) - Video source URLid(number) - Media library attachment IDcaption(string) - Video captionposter(string) - Poster image URLautoplay(boolean) - Auto-play on loadcontrols(boolean) - Show video controls, default: trueloop(boolean) - Loop playbackmuted(boolean) - Mute audioplaysInline(boolean) - Play inline on mobilepreload(string) - Preload setting (auto, metadata, none)tracks(array) - Text tracks (subtitles, captions)blob(string) - Temporary blob URL during upload
Supports
- Align: left, center, right, wide, full
- Spacing: margin, padding
- Interactivity: clientNavigation
Usage
Audio
Name:core/audio
Description: Embed a simple audio player.
Attributes
src(string) - Audio source URLid(number) - Media library attachment IDcaption(string) - Audio captionautoplay(boolean) - Auto-play on loadloop(boolean) - Loop playbackpreload(string) - Preload setting (auto, metadata, none)blob(string) - Temporary blob URL during upload
Supports
- Align: left, center, right, wide, full
- Spacing: margin, padding
- Interactivity: clientNavigation
Usage
Cover
Name:core/cover
Description: Add an image or video with a text overlay.
Attributes
url(string) - Background media URLid(number) - Media library attachment IDalt(string) - Alternative text for background imagebackgroundType(string) - Media type (image, video)dimRatio(number) - Overlay opacity (0-100)overlayColor(string) - Overlay color slugcustomOverlayColor(string) - Custom overlay colorgradient(string) - Gradient preset slugcustomGradient(string) - Custom gradientcontentPosition(string) - Content alignment positionisDark(boolean) - Use light text colorhasParallax(boolean) - Enable parallax effectisRepeated(boolean) - Repeat background imagefocalPoint(object) - Background focal pointminHeight(number) - Minimum heightminHeightUnit(string) - Min height unit (px, vh, etc.)tagName(string) - HTML tag (div, section, etc.)useFeaturedImage(boolean) - Use post’s featured imageposter(string) - Video poster imagesizeSlug(string) - Image size
Supports
- Align: left, center, right, wide, full
- Color: text, heading
- Dimensions: aspectRatio
- Filter: duotone
- Layout: true
- Spacing: margin, padding, blockGap
- Typography: fontSize, lineHeight
- Shadow: true
Usage
File
Name:core/file
Description: Add a link to a downloadable file.
Attributes
href(string) - File URLfileId(number) - Media library attachment ID (deprecated, use id)id(number) - Media library attachment IDfileName(string) - Display filenametextLinkHref(string) - Text link URLtextLinkTarget(string) - Text link targetshowDownloadButton(boolean) - Show download button, default: truedownloadButtonText(string) - Download button textdisplayPreview(boolean) - Display PDF previewpreviewHeight(number) - Preview height in pixelsblob(string) - Temporary blob URL during upload
Supports
- Align: left, center, right
- Color: background, gradients, link
- Spacing: margin, padding
- Interactivity: true
Usage
Icon
Name:core/icon
Description: Insert an SVG icon.
Attributes
icon(string|object) - Icon definition (SVG or icon object)
Supports
- Align: left, center, right
- Color: background, text
- Dimensions: width
- Spacing: margin, padding
- ariaLabel: true
Usage
Media & Text
Name:core/media-text
Description: Set media and words side-by-side for a richer layout.
Attributes
mediaUrl(string) - Media URLmediaId(number) - Media library attachment IDmediaType(string) - Media type (image, video)mediaPosition(string) - Media position (left, right)mediaAlt(string) - Media alt textmediaWidth(number) - Media width percentagemediaSizeSlug(string) - Image sizefocalPoint(object) - Image focal pointimageFill(boolean) - Fill container (crop)verticalAlignment(string) - Vertical alignmentisStackedOnMobile(boolean) - Stack on mobile, default: truehref(string) - Media link URLlinkDestination(string) - Link destinationlinkTarget(string) - Link targetlinkClass(string) - Link CSS classrel(string) - Link rel attributeuseFeaturedImage(boolean) - Use post’s featured image
Supports
- Align: wide, full
- Color: background, gradients, text, link, heading
- Spacing: margin, padding
- Typography: fontSize, lineHeight
Usage
Playlist (Experimental)
Name:core/playlist
Description: Embed a simple playlist.
Attributes
type(string) - Playlist type (audio, video)caption(string) - Playlist captioncurrentTrack(number) - Currently playing track indexshowTracklist(boolean) - Show track listshowImages(boolean) - Show track imagesshowArtists(boolean) - Show artist namesshowNumbers(boolean) - Show track numbersorder(string) - Play order
Supports
- Align: true
- Color: background, gradients, text, link
- Spacing: margin, padding
- Allowed Blocks: core/playlist-track
- Interactivity: true
Best Practices
- Always include alt text - Essential for accessibility and SEO
- Optimize images - Compress images before uploading
- Use appropriate sizes - Select the right image size for your layout
- Provide captions - Add context to media with captions
- Video accessibility - Include captions/subtitles using tracks attribute
- Aspect ratios - Use consistent aspect ratios in galleries
- File downloads - Use descriptive filenames and button text
- Cover overlays - Ensure text is readable against background media