Header Text - Showcase Images with a WordPress Carousel

Images play a role in making a WordPress website attractive and engaging. They grab attention and help convey messages quickly. However, displaying images one by one can take up too much space. That’s where image carousels come in.

An image carousel shows multiple images in a single spot. The images slide automatically or with user control, so you can display visuals without using too much space. Carousels are great for showing product photos, client testimonials, or featured blog posts. They keep users engaged by letting them interact with content easily.

This guide shows you how to create image carousels in WordPress using different methods. We explain using plugins, page builders, and a custom approach. We also share best practices to ensure your carousels look good and load fast. By the end, you’ll know how to set up a WordPress image carousel and when to use it effectively.

KEY TAKEAWAYS

  • Image carousels engage readers by displaying multiple images in a single space.
  • You can use a plugin, a page builder, and a custom code approach to create visually appealing carousels.
  • Always optimize images before adding them to carousels to prevent slow load times.
  • Ensure your carousel is responsive and functions smoothly on mobile devices.
  • Test carousel performance regularly to avoid conflicts with other plugins or scripts.
  • Use carousels strategically; avoid using them for critical content that users may miss.

It’s a rotating set of images displayed in a single spot on a webpage. Images slide or fade one after another, creating a dynamic visual experience. Instead of all images appearing at once, a carousel displays them one by one in a loop, saving space and keeping the design clean.

Image carousels, sliders, and galleries are often confused, but they work in different ways. Carousels move images automatically or allow users to click through them, creating a continuous loop.

Sliders are similar but usually focus on one main image with navigation controls. Galleries, on the other hand, display multiple images at once in a grid or masonry layout, allowing users to view all images simultaneously.

Image carousels are useful in various ways:

  • They can display multiple product angles.
  • Highlight customer testimonials.
  • Present featured blog posts.
  • Present projects or artwork without taking up too much screen space.

By combining visuals and smooth transitions, carousels make websites more interactive and engaging.

While WordPress image carousels can make a website more engaging, they aren’t always the right choice. In some cases, they can harm the user experience instead of improving it.

First, placing a carousel at the top of the homepage can distract users from your main message. Visitors may focus on the moving images and miss important calls to action or key content. If your goal is to highlight a product, service, or announcement, consider using a static hero image with a clear headline instead.

Another situation to avoid is using carousels for critical information. Users often scroll past carousels without clicking through all the slides. When you’re displaying important information, like pricing, contact details, or urgent updates, a carousel is not the best option. Instead, use prominent text sections or static banners to ensure your message is seen.

Remember, overloading a page with multiple carousels can also backfire. Too many moving elements can slow down your WordPress site and confuse visitors. Each carousel requires additional scripts and images, which can increase load times and affect website performance. To display various content types, use tabs, accordions, or well-structured image grids instead.

So, in short, image carousels are best used to showcase visual content that isn’t ‘mission-critical’. For essential information or homepage highlights, stick to clear, static elements that deliver the message without distractions.

WordPress doesn’t offer a native image carousel feature, but you can achieve a similar effect by using:

  1. WP Carousel Plugin
  2. Elementor Page Builder
  3. Custom Code.

Let’s start with the first approach, leading to the subsequent methods.

WP Carousel is a powerful plugin for creating visually appealing image carousels in WordPress. It provides more customization options, allowing you to control layout, transition effects, and navigation styles. This makes it ideal for showcasing products, portfolios, testimonials, or blog posts in a professional and interactive manner.

Here’s how to add a WordPress image carousel using the WP Carousel plugin:

STEP 1: INSTALL PLUGIN

Go to your WordPress Admin Dashboard. Click Plugins Add New. Now, search for WP Carousel in the search bar. When the required plugin appears, click Install Now, then Activate.

Create A WordPress Image Carousel - Install WP Carousel Plugin

STEP 2: ADD IMAGES TO CAROUSEL

Go to WP CarouselAdd New Carousel. Enter a title for the carousel. Choose the Source Type, which is Image in this example. Then, click ADD IMAGE button to add images to the carousel.

Create A WordPress Image Carousel - Create New WordPress Image Carousel

Here, you can upload new images from your computer, insert them from URLs, or select existing ones from the Media Library. In our example, we chose one of the existing ones, and clicked Create a new gallery. You may also add alt text, caption, and description for better SEO.

Create A WordPress Image Carousel - Create a New Gallery

Arrange the images by dragging them into the desired order. Alternatively, click Reverse order for the images to be in reverse order. You can also check Random Order if you’re unconcerned about which order the images are displayed. You can also set the number of columns and size.

Once done with these customizations, click Insert Images to add them to the carousel.

Create A WordPress Image Carousel - Add Images to Carousel

STEP 3: CONFIGURE WORDPRESS IMAGE CAROUSEL SETTINGS

Scroll down on the same page and click GENERAL SETTINGS. Choose Layout Preset and Carousel Style.

Create A WordPress Image Carousel - Layout Preset and Carousel Style

Here, you can adjust the horizontal and vertical gap. You can also set a click action type for the items. Additionally, you can enable Preloader to hide items until the page load is completed.

Create A WordPress Image Carousel - Update Image Carousel General Settings

Then, change the typography, item & image styles, and title & description under DISPLAY SETTINGS.

Create A WordPress Image Carousel - Adjust Image Carousel Display Settings

After that, switch to Carousel Settings to adjust the following options:

  • Slide Speed: Set the duration for each slide (e.g., 3000ms for 3 seconds).
  • Autoplay: Enable or disable automatic sliding.
  • Infinite Loop: Choose whether the carousel should loop continuously.
  • Navigation Arrows: Show or hide navigation arrows.
  • Pagination Dots: Enable dot navigation below the carousel.
Create A WordPress Image Carousel - Image Carousel Settings

If you’re using the premium WP Carousel plugin, you can adjust more settings under LIGHTBOX SETTINGS. Once you’re done configuring the carousel, click Publish to save this carousel for future use.

STEP 4: INSERT WORDPRESS IMAGE CAROUSEL

Go to WP CarouselAll Carousels. Locate your required carousel and copy the shortcode; you will need it to insert carousels on WordPress posts/pages.

Create A WordPress Image Carousel - Copy Image Carousel Shortcode

Now, open the post/page where you wish to display the carousel. Type /Shortcode and select Shortcode block.

Create A WordPress Image Carousel - Insert Shortcode Block

Paste the shortcode you copied earlier and click Save/Publish to save the changes.

Create A WordPress Image Carousel - Insert Image Carousel Shortcode

STEP 5: PREVIEW & TEST WORDPRESS IMAGE CAROUSEL

Open the page/post in a new tab to see the carousel in action.

Create A WordPress Image Carousel - WordPress Image Carousel in Action

If you find any issue or wish to modify settings, return to WP Carousel All Carousels and edit the specific carousel.

Create A WordPress Image Carousel - Edit Image Carousel

Use Elementor Page Builder

Elementor is a well-known page builder that lets you easily add image carousels in WordPress. Follow these steps to create an engaging image carousel using Elementor:

Install and activate Elementor the same way you install any plugin on WordPress by navigating to Plugins Add Plugin. Next, open your page/post in the Elementor editor.

Next, on the left panel, find Image Carousel in the widget search bar. Drag the Image Carousel widget and drop it into the new section.

Create A WordPress Image Carousel - Insert Image Carousel Widget

In the Content tab, click Add Images.

Create A WordPress Image Carousel - Add Images to Carousel

Upload new images or choose existing ones from the Media Library (this is the same thing we did earlier when we used the WP Carousel plugin). Then, click Create a new gallery.

Create A WordPress Image Carousel - Create Hoodies Image Gallery

Rearrange the images by dragging them and click Insert Gallery to add the images to the carousel.

Create A WordPress Image Carousel - Insert Hoodies Image Gallery

Now, you can customize the carousel’s settings. You can:

  • Choose how many images should be visible at once (e.g., 1, 2, 3).
  • Set the size of each slide (e.g., Thumbnail, Medium, Large).
  • Determine how many slides move at a time (e.g., 1 slide per scroll).
  • Select the navigation style.
  • Show left and right navigation arrows.
  • Display clickable dots below the carousel.
  • Show both arrows and dots, or you can remove all navigation controls.
Create A WordPress Image Carousel - Customize Carousel’s Settings

Next, expand Additional Options to configure carousel behavior. For instance, you can enable/disable auto-play, set auto-play speed, activate infinite loop, enable lazy load, set animation speed, and choose whether to pause the carousel when a user hovers over it.

Create A WordPress Image Carousel - Configure Image Carousel’s Behaviour

After that, switch to the Style tab to adjust the following options:

  • Control the space between images.
  • Customize the arrow size, color, and position.
  • Adjust the dot size and color.
  • Add overlay colors or hover effects.

You may also explore other features here.

Create A WordPress Image Carousel - Style Your Image Carousel

Once done with the customizations, click Preview (the eye button) to check the way the carousel looks. Adjust as required. Once satisfied, click Publish to save your changes.

Create A WordPress Image Carousel - Publish Carousel

After that, ensure you test how the carousel appears on Desktop, Tablet, and Mobile. Adjust settings to ensure the carousel is responsive and displays correctly on all devices.

Create A WordPress Image Carousel - Test Carousel on Different Devices

Once done with all the changes, open your post/page in a new tab and see how it looks:

Create A WordPress Image Carousel - Hoodie Image Carousel

Host your WordPress site with Hosted® that offers optimized servers for performance, plus advanced security tools like LiteSpeed protection, malware scanning, and free SSL included.
Our expert support team is always ready to help, so your site stays protected.

If you want full control over your image carousel’s design and behavior, you can create it using HTML, CSS, and JavaScript. This approach gives you the flexibility to customize every detail, from layout and navigation to transitions and responsiveness. Let’s go through the steps:

Step 1: Access Your Website’s Files & Create Folders

Open your hosting’s File Manager and navigate to the following directory:

public_html/wp-content/themes/your-active-theme

Ensure you replace your-active-theme with your active theme’s folder name. For example, in our example, we use the Twenty Sixteen theme, so it will be as follows:

public_html/wp-content/themes/twentysixteen

Then, create the following folders inside your active theme’s folder:

  1. css folder
  2. js folder
  3. images folder
  4. template-parts folder.

If these are already there, you can skip creating them.

Create A WordPress Image Carousel - Create Folders in Active Theme’s Directory

Step 2: Create HTML Structure File

Navigate to the following directory:

public_html/wp-content/themes/twentysixteen/template-parts

Create a new file called carousel-template.php and add the following code to this file:

<?php
<div class="carousel-container">
<div class="carousel-wrapper">
<div class="carousel-slide">
<img src="<?php echo get_template_directory_uri(); ?>/images/image1.jpg" alt="Slide 1">
</div>
<div class="carousel-slide">
<img src="<?php echo get_template_directory_uri(); ?>/images/image2.jpg" alt="Slide 2">
</div>
<div class="carousel-slide">
<img src="<?php echo get_template_directory_uri(); ?>/images/image3.jpg" alt="Slide 3">
</div>
</div>
</div>
?>

Ensure you replace image1.jpg, image2.jpg, and image3.jpg with actual image file names. Then, save your file.

Create A WordPress Image Carousel - Create Structure of Image Carousel

Open the js folder inside the theme directory. Create a carousel.js file, add the following code to it, and save the file:

document.addEventListener("DOMContentLoaded", function () {
const slides = document.querySelectorAll(".carousel-slide");
let index = 0;
setInterval(() => {
index = (index + 1) % slides.length;
slides.forEach((slide) => {
slide.style.transform = `translateX(-${index * 100}%)`;
});
}, 3000);
});
Create A WordPress Image Carousel - Create Basic Image Carousel

Write the following in the public_html/wp-content/themes/twentysixteen/css/carousel.css file and save it:

.carousel-container {
overflow: hidden;
width: 100%;
}
.carousel-wrapper {
display: flex;
transition: transform 0.5s ease;
}
.carousel-slide {
min-width: 100%;
}
Create A WordPress Image Carousel - Style Image Carousel

Open the public_html/wp-content/themes/twentysixteen/functions.php file. Scroll to the bottom, add the following code, and save this file:

// Enqueue CSS and JS Files
function enqueue_carousel_assets() {
wp_enqueue_style('carousel-css', get_template_directory_uri() . '/css/carousel.css');
wp_enqueue_script('carousel-js', get_template_directory_uri() . '/js/carousel.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'enqueue_carousel_assets');
// Carousel Shortcode Function
function basic_image_carousel() {
ob_start();
get_template_part('template-parts/carousel-template');
return ob_get_clean();
}
add_shortcode('basic_carousel', 'basic_image_carousel');
Create A WordPress Image Carousel - Create Image Carousel Shortcode

Now, open your post or page. Insert the Shortcode block and write [basic_carousel] in it. Then, save your post or page.

Create A WordPress Image Carousel - Insert Shortcode

Here’s how the WordPress image carousel looks based on our code in the example:

Create A WordPress Image Carousel - Custom WordPress Image Carousel
  • Ensure image sizes are consistent for a professional look.
  • Optimize images for fast loading.
  • Add alt (alternative) text to each image for better search engine indexing.
  • Check how the carousel appears on different devices.
  • Avoid using too many images to maintain fast loading times.
Strip Banner Text - Maximize your WordPress site’s performance with premium WordPress Hosting. [More Info]

FAQS

Are there any performance issues with using WordPress image carousels?

Yes, carousels with too many high-resolution images can slow down your WordPress site. To maintain performance, optimize images before uploading, limit the number of slides, and avoid using multiple carousels on the same page.

Can I use a carousel to display WooCommerce products?

Yes, many plugins, such as All-In-One Product Slider Carousel for WooCommerce, allow you to showcase products in a slider format. You can also use Elementor’s carousel widget to display featured products dynamically.

How can I prevent my carousel from affecting page load speed?

To prevent your carousel from slowing down your WordPress website, start by optimizing all images before uploading. Compress images using tools like TinyPNG or WP Smush to reduce file size without losing quality. Implement lazy loading to delay loading off-screen images until they’re required. Additionally, minimize JavaScript files and avoid using heavy libraries. You can also set a maximum number of slides to avoid loading too many images at once.

How do I prevent the carousel from looping continuously?

In plugin settings, disable the infinite loop option. In custom JavaScript, add a conditional statement to prevent the carousel from resetting to the first slide after reaching the last one.

Can I use Elementor’s carousel widget without the Pro version?

Yes, Elementor’s free version includes a basic Image Carousel widget. However, the Pro version offers more advanced controls, including custom animations and post carousels.

How To Upload HTML Files To WordPress: 3 Easy Methods

WordPress Anchor Links: Easy Manual & Automatic Setup

How To Export WordPress Theme: 4 Easy Ways

How To Embed A PDF In WordPress: Manual & Plugin Setup

WordPress Breadcrumbs: How To Add & Display Them On Your Site