Skip to content
GPLWP Guides

How to create image sliders in WordPress

Media & Galleries Time About 20 minutes 6 steps Updated 8 Sep 2026

MEDIA & GALLERIES
The short answer

WordPress can create a responsive image gallery without a plugin, but its core Gallery block is not a full slider with autoplay and slide controls. For a real image slider, use a dedicated slider plugin and add it to your page with its block or embed option.

The route
  1. 01Prepare the slide images
  2. 02Add the core gallery
  3. 03Set links and image behaviour
  4. 04Install a slider plugin
  5. 05Configure and place the slider
  6. 06Use LayerSlider for the fast route

What you need

  • Admin access to your WordPress site
  • Five or more appropriately sized images
  • A page or post where the slider will appear
  • A recent backup before installing a new plugin

Prepare the slide images

Choose images that share a similar aspect ratio, such as landscape images that are all 16:9. This prevents jumps in height between slides. Resize and compress large originals before uploading them, then give each image useful alternative text in the Media Library.

Keep the important subject away from the extreme edges. Slider themes often crop images differently on phones, tablets and desktop screens.

Add the core gallery

Edit the page or post, select the block inserter, and add a Gallery block. Upload new images or choose existing images from the Media Library, then drag the images into the order you want. WordPress lets you set columns, image resolution, cropping and aspect ratio in the block settings.

This is the manual route. It is fine when you want a grid of images or a click-to-enlarge gallery, but the core block does not provide the usual slider features such as automatic rotation, slide-by-slide captions or a dedicated carousel layout. The built-in enlarge option opens images in a lightbox with previous and next navigation instead.

Set links and image behaviour

Select the Gallery block and decide what happens when a visitor clicks an image. Use Enlarge on click for a lightbox, link to the media file if visitors should open the original image, or leave the images unlinked. Add captions where they provide useful context rather than repeating the page heading.

Preview the published page, not only the editor. Check the gallery on a narrow phone screen and confirm that cropped images still show the subject clearly.

Install a slider plugin

If you need a genuine slider, install a dedicated image-slider plugin from PluginsAdd New, or upload a plugin ZIP from PluginsAdd NewUpload Plugin. Activate it only after the upload completes, then use its slider creation screen to add images, navigation controls, captions and responsive settings.

Do not install several slider plugins to solve the same problem. Their JavaScript and styling can conflict, causing missing arrows, broken touch controls or a slider that shows briefly and then disappears. Make a backup and check the plugin's update history and support information before using it on a live site.

Configure and place the slider

In the slider editor, choose a fixed or responsive layout, set the image size, and decide whether autoplay should be enabled. Keep manual previous and next controls visible if slides contain important information, and set a readable pause time. Add captions or buttons only when they help visitors understand the image or take an action.

Save the slider, then copy its block, shortcode or embed code according to the plugin instructions. Add that output to the target page, template or widget area. Test keyboard navigation, swipe gestures, links, captions and the layout at several browser widths before publishing.

Use LayerSlider for the fast route

For a quicker build with more visual control, use LayerSlider Responsive WordPress Slider Plugin. Its drag-and-drop editor is designed for image, video and HTML slides with layers, animations, responsive layouts and pre-built templates, so you can create the slider without writing code.

After activation, open the LayerSlider area, choose a template or start a new project, add your images, adjust the slide timing and responsive behaviour, then insert the finished slider into the page using the method provided by the plugin. Check the mobile preview before publishing.

The fast route

Let LayerSlider Responsive WordPress Slider Plugin do it

Layer-based drag-and-drop sliders with images, video, HTML, and animations; choose it for advanced visual storytelling without code.

Get LayerSlider Responsive WordPress Slider Plugin

Sources

  1. wordpress.org /documentation/article/gallery-block/?utm_source=openai

Questions

Can WordPress create an image slider without a plugin?
WordPress can create an image gallery without a plugin, but the core Gallery block is not a complete rotating image slider. It supports columns, cropping, aspect ratios and a lightbox with previous and next navigation, while autoplay and richer slide controls normally require a slider plugin or custom development.
What is the difference between a gallery and a slider?
A gallery displays several images together, usually in rows or columns, while a slider shows one slide or a moving group of slides at a time. WordPress's Gallery block is suitable for a simple grid and click-to-enlarge lightbox, but use a slider tool when you need autoplay, arrows, swipe behaviour, captions or layered content.
Why are my slider images different heights?
Slider images usually appear at different heights because the source files use mixed aspect ratios or because the slider is preserving each image's natural dimensions. Prepare images with a consistent ratio, set a defined slider height or aspect ratio, and check the crop setting on mobile so important parts of the image are not cut off.
Why does my image slider show a blank space or disappear?
A slider that shows a blank space or disappears is commonly affected by a plugin conflict, cached scripts, a theme's container width or a slider placed inside a hidden tab or accordion. Clear the site and browser cache, test with other slider and optimisation plugins disabled, and confirm that the slider container is visible when the page loads.
Should an image slider use autoplay?
Autoplay is optional and should not be the only way to view important content. Give visitors visible previous and next controls, pause movement when they interact with the slider, use a reasonable delay, and make every slide reachable with touch and keyboard controls. For a small set of images, a static gallery or lightbox may be clearer.