Media · Gutenberg
Image Slider block for WordPress
A responsive image carousel with captions, autoplay, arrows, dots and touch support.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
A responsive image carousel with captions, autoplay, arrows, dots and touch support.
Inspector panels on this block: Slides, Autoplay & Behaviour, Navigation, Dimensions, Caption & Button. Those titles come from index.js, not from a shared template.
Behavior controls: “Transition” options: Slide, Fade; “Arrow Style” options: Rounded, Circle, Square; “Image Fit” options: Cover, Contain, Fill; “Caption Position” options: Bottom Left, Bottom Center, Center, None.
Where to find it
Gutenberg inserter → Media → search “Image Slider” (block name `blockenberg/image-slider` in block.json). Style it in the sidebar after insert.
How to use Image Slider block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Image Slider”, insert it. Category: Media.
- Configure inspector controls that exist on this block. Open Slides. Set “Slides — Title”, “Subtitle”, “Button Label (optional)”, “Button URL”.
- Check the published page. The view script reads HTML data attributes: data-autoplay, data-loop, data-pause-hover, data-speed, data-transition. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Slides — Title | Text field in the inspector. |
| Subtitle | Text field in the inspector. |
| Button Label (optional) | Text field in the inspector. |
| Button URL | Text field in the inspector. |
| Open in new tab | On/off toggle in the inspector. |
| Autoplay | On/off toggle in the inspector. On by default. Saved as `autoplay`. |
| Speed (ms) | Numeric range control in the inspector. Range 1000–10000. block.json default: 4000. Saved as `autoplaySpeed`. |
| Pause on Hover | On/off toggle in the inspector. On by default. Saved as `pauseOnHover`. |
| Loop | On/off toggle in the inspector. On by default. Saved as `loop`. |
| Transition | Select control; the chosen value is saved on the block. Options: Slide; Fade. block.json default: slide. Saved as `transition`. |
| Show Arrows | On/off toggle in the inspector. On by default. Saved as `showArrows`. |
| Arrow Style | Select control; the chosen value is saved on the block. Options: Rounded; Circle; Square. block.json default: rounded. Saved as `arrowStyle`. |
| Show Dots | On/off toggle in the inspector. On by default. Saved as `showDots`. |
| Height Desktop (px) | Numeric range control in the inspector. Range 200–900. block.json default: 480. Saved as `height`. |
| Height Mobile (px) | Numeric range control in the inspector. Range 100–600. block.json default: 280. Saved as `mobileHeight`. |
| Border Radius (px) | Numeric range control in the inspector. Range 0–40. block.json default: 10. Saved as `borderRadius`. |
| Image Fit | Select control; the chosen value is saved on the block. Options: Cover; Contain; Fill. block.json default: cover. Saved as `objectFit`. |
| Caption Position | Select control; the chosen value is saved on the block. Options: Bottom Left; Bottom Center; Center; None. block.json default: bottom-left. Saved as `captionPosition`. |
| Button Style | Select control; the chosen value is saved on the block. Options: Primary (solid); Outline; Ghost (text). block.json default: primary. Saved as `btnStyle`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-autoplay, data-loop, data-pause-hover, data-speed, data-transition.
- Keyboard handlers move focus between items.
When this is the right block
- A responsive image carousel with captions, autoplay, arrows, dots and touch support — that is the job of Image Slider, not a generic content block.
- Use it when you need the editor control labeled “Slides — Title”, which exists on this block’s inspector.
- It matches pages about slider, carousel, gallery.
- Inserter grouping: video, animation, and rich media sections.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Image Slider block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Image Slider”. It sits under Media. After insert, open Slides and set “Slides — Title”, “Subtitle”, “Button Label (optional)”, “Button URL”.
What makes Image Slider different from other Blockenberg blocks?
A responsive image carousel with captions, autoplay, arrows, dots and touch support. Inspector labels on this block include “Slides — Title”, “Subtitle”, “Button Label (optional)”, “Button URL”.
Is the Image Slider Gutenberg block free?
Yes. Image Slider ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Image Slider to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Slides, Autoplay & Behaviour, Navigation, Dimensions).
Related media blocks
Thumbnail Gallery
Large main image with a scrollable thumbnail strip navigation.
Before / After Grid
A grid of interactive before/after image comparison sliders — show multiple transformations, makeovers, or design iterations in one layout.
Before/After Slider
Compare two images with a draggable slider handle.
Image Cards
A responsive grid of rich cards with images, category tag, title, description and CTA. Perfect for blog previews, portfolio, services or team showcases.
Image Collage
Creative overlapping image composition with up to 5 images, custom rotations, positions, frames and a floating overlay card. Perfect for hero and about sections.
Image Gallery
Responsive image gallery with grid/masonry layouts, lightbox, and hover effects.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Image Slider from the Gutenberg inserter.