DeLight turns a group of images into an image slider. You add the slider to the page or post itself, and use the WordPress Media Library that you already know for adding images. There is no separate screen for the slider and nothing to copy from one place to another.
Each DeLight image slider can be set to slide or fade between the images when visitors click or swipe, or set to fade automatically as a slideshow.
How do you add an image slider in the block editor?
- Click the plus icon in the top left corner of the editor, type ‘DeLight’ in the search field and select the ‘DeLight slider’ block.
- Click ‘Media Library’ to choose images that are already on your website, or click ‘Upload’ to add new images.
- Click each image that you want in the image slider, then click ‘Select’.
- To change the order of the images or to add captions, click ‘Edit gallery’ in the toolbar above the image slider. Drag the images into the order you want. To add or change a caption, click the image and type the caption in ‘Image Caption’ in the right-hand column, or in the field below the image. Then click ‘Update gallery’.
- Choose how the image slider works in the right-hand sidebar, under ‘Slider settings’.
- Click ‘Publish’, or ‘Save’ if the page or post has already been published.
To add more images later, click ‘Edit gallery’ and then ‘Add to gallery’.
If your theme allows it, the image slider can also fill the full width of the page. Click the image slider and choose ‘Full width’ in the toolbar above the slider.
Important: WordPress also has its own ‘Gallery’ block. That block does not become an image slider, so always use the ‘DeLight slider’ block.
How do you add an image slider in the classic editor?
If your website uses the classic editor, or if you use a ‘Classic’ block, the image slider is made from a WordPress gallery.
- Click the ‘Add Media’ button above the editor, or the ‘Add Media’ icon in the toolbar of the ‘Classic’ block.
- Select ‘Create gallery’ on the left.
- Open the ‘Media Library’ tab and click each image that you want in the image slider.
- Click ‘Create a new gallery’.
- Under ‘Gallery Settings’, select one of the three DeLight types in ‘Gallery type’. The settings of the image slider appear below ‘Gallery type’.
- Click ‘Insert gallery’.
If you choose ‘WordPress Native’ in ‘Gallery type’, the images are shown as an ordinary WordPress gallery instead of an image slider.
Should the images slide, fade or run as a slideshow?
You choose this in ‘Gallery type’.
‘DeLight slide’ slides the images sideways. Visitors click the arrows or the numbers, or click the right or left half of the image, to see the next or the previous image. On a phone or tablet, visitors swipe.
‘DeLight fade’ works in the same way, however each image fades into the next one instead of sliding.
‘DeLight automatic fade’ runs as a slideshow. Each image stays on screen for a few seconds and then fades into the next image. Visitors can pause the slideshow, or click a number or a small image below the slider to go to a particular image.
A slideshow suits a calm series of photographs at the top of a page. For a portfolio that visitors want to look at one image at a time, choose ‘DeLight slide’ or ‘DeLight fade’.
What can you change in the settings of an image slider?
- ‘Slide numbers’ shows numbers above or below the images, a row of small images (thumbnails) below the images, or nothing at all. With the numbers, arrows for the previous and next image appear as well, except in a slideshow.
- ‘Image captions’ set to ‘Yes’ shows the caption of each image below the image.
- ‘Loop’ set to ‘Yes’ starts again with the first image after the last one. Set to ‘No’, the image slider stops at the last image.
- ‘Transition speed’ sets how quickly one image slides or fades into the next, from ‘Fast (500ms)’ to ‘Slowest (3000ms)’. ‘Off (use speed from DeLight settings)’ uses the speed that is set for your whole website.
- ‘Time per image’ is only for a slideshow and sets how long each image stays on screen: ‘Lively (2 s)’, ‘Calm (3 s)’ or ‘Slow (4 s)’.
Where do you set the settings for all image sliders on your website?
Go to Settings → DeLight Image Slider. The settings on this page apply to every image slider on your website, unless you change a setting in the image slider itself. Click ‘Update DeLight Settings’ to save your changes.
Why are the small images below an image slider square?
Images that were added to your website before DeLight was installed or updated do not yet have the size that DeLight needs for the thumbnails. The row of thumbnails then shows square versions of the images instead.
Go to Settings → DeLight Image Slider and click ‘Regenerate thumbnails’ once. WordPress then makes the right size of every image on your website. On a website with many images, this can take several minutes. The message ‘All thumbnails regenerated successfully.’ appears when WordPress has finished.
Do you need to choose an image size?
No. DeLight chooses the right image size for each screen by itself, so the images are sharp on every screen without making the page slow. DeLight also loads each image only when a visitor is about to see the image, so a page with an image slider stays fast.
Earlier versions of DeLight had an ‘Image width’ setting. This setting no longer exists.
What happens when one image slider has both portrait and landscape images?
DeLight gives all the images in that image slider the same frame, so the slider does not change height from one image to the next. Every image is shown whole, never cut off, in the top left corner of the frame.
The frame takes the shape of the most common landscape image in the slider, so changing the order of the images can change the frame. On a phone, and in a narrow column, the frame is square. Images of the same shape give the calmest result.
Why should every image have alt text?
Alt text describes an image for visitors who cannot see the image, and screen readers read the alt text out. Fill in the ‘Alt Text’ of each image in the Media Library. If an image has no alt text and the captions are hidden, DeLight uses the caption instead.
How does an image slider work for visitors who use a keyboard or a screen reader?
DeLight works with a keyboard and a screen reader without any settings.
Visitors can reach every button of the image slider with the Tab key and press the button with Enter or the space bar. The arrow keys ← and → show the previous or the next image. Screen readers read out what each button does, such as ‘Next image’, and which image is shown, such as ‘Image 3 of 8’.
A slideshow always has a ‘Pause’ button at the bottom left. The slideshow also pauses by itself while the mouse pointer is over the image slider and while the slider is not on screen. When a visitor has asked their phone or computer to reduce motion, the slideshow starts paused, and ‘DeLight slide’ fades between the images instead of sliding.
The words that screen readers read out are also available in Dutch, Danish and French.
Tip: in Safari, the Tab key skips buttons unless ‘Press Tab to highlight each item’ is switched on in Safari’s settings. The arrow keys work without this setting.
How can a developer adjust the image slider in the theme?
These adjustments are optional and belong in the theme’s code. In the theme’s CSS:
.delight_master_wrapper {
--delight-thumbnail-highlight: #A4D4FB; /* highlight behind the active thumbnail (default light blue) */
--delight-frame-background: transparent; /* empty part of the fixed frame for images of different shapes */
--delight-frame-position: left top; /* where an image sits inside that frame */
--delight-focus-color: currentColor; /* keyboard focus outline (default: the text colour) */
--delight-overlay-background: #fff; /* keyboard previous/next buttons over the image */
--delight-overlay-color: #000;
}In the theme’s functions.php:
// A fixed frame shape for sliders with images of different shapes (width ÷ height)
add_filter( 'delight_image_slider_frame_ratio', function () { return 1.5; } );
// Themes that load pages without a full page load (AJAX): load the slider's files on every page
add_filter( 'delight_image_slider_load_everywhere', '__return_true' );DeLight needs WordPress 5.0 or newer and PHP 7.4 or newer.
If an image slider on your website does not work as described here, send an email to hello@fourteenrockets.com with the URL of that page on your website.