Skip to content
GPLWP Guides

How to create responsive image galleries in WordPress

Media & Galleries Time About 20 minutes 6 steps Updated 26 Oct 2026

MEDIA & GALLERIES
The short answer

WordPress can create responsive image galleries without a plugin. Use the built-in Gallery block, choose an appropriate image resolution, set sensible columns and test the result on mobile. Add a gallery plugin when you need advanced layouts, filtering or tighter responsive controls.

The route
  1. 01Prepare images for the gallery
  2. 02Add the Gallery block
  3. 03Set columns and image resolution
  4. 04Choose cropping and lightbox behaviour
  5. 05Check the gallery on mobile
  6. 06Take the fast plugin route

What you need

  • A WordPress site with editor access
  • Images uploaded to the Media Library
  • A page or post where the gallery will appear
  • A phone or browser developer tools for testing

Prepare images for the gallery

Upload appropriately sized images to the Media Library before building the gallery. WordPress creates several image sizes and can add srcset and sizes attributes so browsers can select a suitable file for the available screen size.

Give each image useful alternative text in the Media Library or gallery editor. Avoid uploading enormous originals when a smaller source will do, because a gallery with many full-size images can make mobile pages slow.

Add the Gallery block

Edit the page or post, select the block inserter, search for Gallery, and choose the Gallery block. Select images from the Media Library or upload new ones, then drag them into the order you want. WordPress automatically arranges the selected images into a gallery layout.

If the gallery should update whenever new images are attached to the post, use the attached-images option where your editor provides it. For a fixed portfolio or project gallery, select the images manually.

Set columns and image resolution

Select the gallery itself, rather than one image inside it, and adjust the column count in the block settings. Start with three columns on desktop and reduce the number if the thumbnails become too narrow. The Gallery block supports up to eight columns, subject to the number of images.

Choose a suitable image resolution. Thumbnail can look blurry when displayed at a larger width, while Large is usually a safer choice for a responsive gallery. WordPress’s responsive image markup can then offer a more suitable generated size to the browser.

Choose cropping and lightbox behaviour

Decide whether to enable Crop images to fit. Cropping makes rows line up neatly when photos have different shapes, but it can cut off faces, products or other important details. Turn it off for documentary, product or portrait galleries where showing the complete image matters.

For a larger view, set the gallery’s link option to Enlarge on click. This opens the image in a lightbox without sending visitors to another page. Check the result after publishing, because a cropped thumbnail can make the lightbox appear to crop the photo as well in some setups.

Check the gallery on mobile

Preview the published page at desktop, tablet and phone widths. Look for horizontal scrolling, thumbnails that are too small to tap, clipped subjects, blurry images and captions that overflow their tiles. Some block themes and editors provide separate desktop, tablet and mobile column controls; use them when they are available.

If the gallery still stays at an unsuitable width, inspect the theme’s spacing and container settings before adding custom CSS. A theme rule that forces a fixed width or aspect ratio is a common reason a gallery looks different on the front end from the editor. Clear any page cache after changing gallery settings.

Take the fast plugin route

The built-in Gallery block is fine for a straightforward grid with responsive image loading and a basic lightbox. Use a dedicated gallery plugin when you need more control over responsive layouts, galleries managed separately from page content, advanced lightboxes or drag-and-drop placement.

Envira Gallery is a practical option for visual sites built with Beaver Builder. It provides drag-and-drop galleries inside Beaver Builder, responsive layouts and lightboxes, so you can create and insert the gallery without writing custom layout code. Create the gallery in the plugin, configure its responsive settings, then place it in the page with the available Beaver Builder module.

The fast route

Let Envira Gallery do it

Drag-and-drop galleries inside Beaver Builder, with lightboxes and responsive layouts; ideal for visual sites built with Beaver Builder.

Get Envira Gallery

Sources

  1. developer.wordpress.org /apis/responsive-images/?utm_source=openai
  2. wordpress.org /documentation/article/gallery-block/?utm_source=openai
  3. wordpress.com /support/wordpress-editor/blocks/gallery-block/gallery-setti…

Questions

Does WordPress create responsive galleries without a plugin?
Yes. WordPress’s Gallery block provides column, resolution and cropping controls, while WordPress-generated image markup can include responsive <code>srcset</code> and <code>sizes</code> attributes. The built-in route is suitable for a simple grid, but your theme still controls some container and spacing behaviour.
Why do gallery images look blurry on mobile or desktop?
Gallery images usually look blurry because the selected resolution is too small for the displayed tile, often because Thumbnail was chosen for a wider gallery. Edit the Gallery block and try Large, then check that the original upload is large enough and that no optimisation or theme setting is replacing it with a smaller file.
Should I crop images in a responsive WordPress gallery?
Crop images when consistent tile shapes are more important than showing every part of every photo. Leave cropping off for portraits, products and images where the edges contain important information, because fitting mixed aspect ratios into equal tiles can remove the subject or make the lightbox view misleading.
How many columns should a mobile image gallery use?
Use fewer columns on narrow screens so each image remains large enough to recognise and tap. Two columns can work for square thumbnails, while one column is often better for landscape photos, detailed work or galleries with captions. Use separate responsive column controls when your block theme or editor provides them, then verify the published page on a real phone.
When do I need a WordPress gallery plugin?
You need a plugin when the core Gallery block does not provide the layout, lightbox, filtering, pagination or builder integration your site needs. For a basic responsive grid, the native block is usually enough; for a Beaver Builder site that needs drag-and-drop gallery management and more presentation controls, Envira Gallery is a suitable faster route.