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

Minimalist Photography Portfolio Child Theme
Minimalist Photography Portfolio Child Theme

Minimalist Photography Portfolio Child Theme

9th February 2026
How to Build a Minimalist Portfolio Website in WordPress (2026)
How to Build a Minimalist Portfolio Website in WordPress (2026 Complete Guide)

How to Build a Minimalist Portfolio Website in WordPress (2026)

3rd February 2026
Video Film Portfolio Child Theme
Video Film Portfolio Child theme screenshot.

Video Film Portfolio Child Theme

13th January 2026
Best Portfolio WordPress Themes for 2026

Best Portfolio WordPress Themes for 2026

30th December 2025
Minimalist Portfolio Themes for Videomakers
WordPress Themes for Videomakers.

Minimalist Portfolio Themes for Videomakers

12th December 2025
8 Minimalist WordPress Themes for Graphic Designers
Minimalist WordPress Themes for Graphic Designers.

8 Minimalist WordPress Themes for Graphic Designers

18th October 2025