Last image in WordPress gallery is too wide

Summary

Since you are here, you probably don’t like the last image being full width in the Gutenberg gallery either. Just why is it all over the place. I personally hate it.

There are two options

  1. Hack it – just add simple CSS code
  2. Use different Gallery

1. Adding the code:

Thankfully, it’s super easy, all you have to do is to add this code to your custom CSS. So, in the Customizer, just add this:

.wp-block-gallery.has-nested-images figure.wp-block-image {
flex-grow:0;
}

A video tutorial how to add custom CSS code.

2. Use different Gallery

If you are using the Minimalio free theme with the Premium plugin, there is a Minimalio gallery block for you. It also comes with more options than the default WP gallery, that are super useful. Here is a tutorial how to add the gallery.

If you are not using Minimalio, you can check out these gallery plugins, that I have tested. But honestly, it’s kind of a disaster when it comes to gallery plugins.

Good luck!

25th February 2025

Creator of Minimalio theme.

Latest

Why AI Is Almost Useless for Color Grading
Interview with a colorist Nicole Goode.

Why AI Is Almost Useless for Color Grading

Interviews
How to Start a WebDesign Agency
Interview with Chris Lettner.

How to Start a WebDesign Agency

Interviews
Minimalio Offers WooCommerce Styling
WooCommerce Minimalio Screenshot.

Minimalio Offers WooCommerce Styling

Minimalio Theme
How to Make a Cheap Portfolio Website
Cheap portfolio website.

How to Make a Cheap Portfolio Website

Website Tips
10+ Art Portfolio Examples with WordPress

10+ Art Portfolio Examples with WordPress

Portfolio Examples
Minimal Photography Blog Child Theme
Minimal Photography Blog Child Theme.

Minimal Photography Blog Child Theme

Minimalio Theme