WordPress Gallery Not Displaying Correctly: Best Fix (2026)

You add a gallery, set it to display 3 images per row, and instead get one column, images stacked oddly, or inconsistent sizing across the row. WordPress gallery not displaying correctly is usually caused by a CSS conflict between your theme and the gallery block, inconsistent source image sizes, or in one specific case, a known bug introduced in a WordPress core update. Here’s how to diagnose and fix it.

Step 1: Identify the Specific Symptom

The fix depends heavily on exactly what’s going wrong:

  • All images stacked in one column instead of the set number, usually a CSS conflict
  • Images showing at inconsistent sizes within the same row: usually a source image size mismatch
  • Gallery looked fine before, broke after a WordPress update; possibly the known WordPress 6.1 gallery block bug
  • Gallery displays fine in the editor but broken on the live site; usually a theme or caching issue

Step 2: Check for the Known WordPress 6.1 Gallery Block Bug

WordPress 6.1 introduced a change to how the Gallery block’s layout CSS works, which caused display issues (usually collapsing to a single column, or spacing breaking) across many themes that hadn’t been updated to account for the change. If your gallery broke specifically after updating WordPress core (rather than after a theme or plugin change), this is a strong candidate.

The fix is a small CSS snippet added via Appearance > Customize > Additional CSS:

css
.is-layout-flex {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

wordpress gallery not displaying correctly code

This restores the flexible row-based layout that the gallery block relies on, which some themes’ own CSS was unintentionally overriding after the WordPress 6.1 change.

Step 3: Check for Inconsistent Source Image Sizes

If images within the same gallery appear at noticeably different sizes or heights, the actual uploaded source images are likely different dimensions or aspect ratios. WordPress’s gallery layout tries to accommodate this, but large size differences (a very tall portrait image next to a wide landscape one) can create visibly uneven rows.

Fix options:

  • Crop or resize your source images to consistent dimensions before uploading, for the cleanest result
  • Set a consistent “Image Size” setting within the Gallery block’s settings (rather than “Full Size,” which uses the original uploaded dimensions as-is)

Step 4: Check for a Theme CSS Conflict

If the CSS fix in Step 2 doesn’t apply to your situation, your theme’s own custom styles may be directly conflicting with the gallery block’s structure.

  1. Temporarily switch to a default WordPress theme (like Twenty Twenty-Four)
  2. Check if the gallery displays correctly there
  3. If it does, the issue is theme-specific check your theme’s documentation or support forum for any known gallery-related CSS conflicts, since this is common enough that many theme developers have already documented a fix

Step 5: Rule Out a Plugin Conflict

Page builder plugins, image optimization plugins, and lazy loading features can occasionally interfere with how gallery images render.

  1. Deactivate plugins one at a time, prioritizing page builders and image-related plugins first
  2. Check the gallery display after each deactivation
  3. Identify the conflicting plugin and check its settings for a relevant toggle

Step 6: Check for a caching issue with WordPress gallery not displaying correctly

If you’ve applied a CSS fix or resized images but the live site still shows the broken layout, a caching plugin may be serving an outdated cached version of the page.

  • Clear your caching plugin’s full cache
  • Clear CDN cache if applicable
  • Test in an incognito window to confirm

Step 7: Try Regenerating Thumbnails (If Sizing Looks Off After a Theme Change)

If you recently changed themes and images now appear cropped or sized incorrectly within galleries, your new theme may use different thumbnail dimensions than your previous one. A thumbnail regeneration plugin can rebuild all image sizes to match your current theme’s requirements, resolving inconsistent cropping across existing galleries.

wordpress gallery not displaying correctly gallery

Diagnostic Quick Reference

Symptom Likely Cause Fix Step
Collapsed to one column after a WordPress update Known WP 6.1 gallery block CSS issue Step 2
Images different sizes in the same row Inconsistent source image dimensions Step 3
Broken specifically with your active theme Theme CSS conflict Step 4
Fine in editor, broken on live site Caching, or theme/plugin difference Step 5-6
Cropped oddly after a theme change Thumbnail sizes need regenerating Step 7

Frequently Asked Questions of wordpress gallery not displaying correctly

Why did my gallery suddenly break with no changes on my end? A WordPress core auto-update (particularly around version 6.1) is a common trigger check Step 2 first if the timing lines up with an update rather than any change you made yourself.

Do I need to fix this in a child theme rather than directly in Customizer CSS? Additional CSS added through the Customizer (Step 2’s method) is safely stored separately from your theme files and isn’t affected by theme updates, so a child theme isn’t strictly necessary for this specific fix.

Will resizing my images retroactively fix already-published galleries? Not automatically you’d need to either re-upload resized versions or use a thumbnail regeneration tool (Step 7) to rebuild the various sizes WordPress uses for display.

Is this a WordPress bug or a theme problem? It can be either the Step 2 issue is a known core-level layout change that exposed conflicts in themes not built to account for it, which is why some themes broke and others didn’t after the same WordPress update.

Final Thoughts for wordpress gallery not displaying correctly

WordPress gallery not displaying correctly usually comes down to a CSS conflict, inconsistent image sizing, or in some cases, a known layout change introduced in a WordPress core update. Work through the diagnostic table above to match your specific symptom to the right fix. If your galleries are still misbehaving after trying these steps, get in touch here, and I’ll fix it directly.

Recommended Tools & Plugins

Every tool below is something I actually use on client projects, not a random affiliate list.

  • Hosting: Cloudways  fast, managed WordPress hosting
  • Theme: GeneratePress  lightweight, built for speed
  • Page Builder: Elementor Pro  the builder behind most of my client sites
  • Forms: WPForms  reliable, beginner-friendly form builder
  • Directory/Listing Sites: Directorist  for business directory or listing projects
  • Elementor Add-ons: Crocoblock (JetEngine)  for dynamic, database-driven sites
  • Keyword Research: Mangools is the SEO tool I use for keyword research
  • Backups: UpdraftPlus  never launch a site without a backup plan
  • Course Platform: Tutor LMS is the LMS plugin
  • Free Speed Test: Google PageSpeed Insights is the free tool I use to check real Core Web Vitals data

Leave a Reply

Your email address will not be published. Required fields are marked *