WordPress’s Gutenberg editor is a big change over the previous Classic Editor. It’s far more mature now than when it was first released, but there are still some gaps in what it can do.
One of those times is when adding multiple images inline in a post. 1
With the Classic Editor, you could choose multiple images in the Media Library, and it would insert them all. Whether it was two or 50 images, they’d all insert inline in sequence.
But when you go to add images using the Gutenberg Block Editor, you can only choose one image at a time. And that gets tedious very quickly if you’re inserting a series of multiple images into the post.
But there’s a workaround that I’ve found to work reasonably well. It’s a simple trick. And it doesn’t require any plugins or code.
Workaround for Block Editor Inserting Multiple Images
Start with the usual block selection by pressing the + button.
Normally, it would be logical to use the Image block. But don’t use that here.
Instead, use the Gallery block. You can find it by hitting the
Browse all button or start typing “gallery” in the search bar.
It will insert a blank Gallery block, like this:
Select your source for the images, whether uploading new ones or from the Media Library. In this example, I’m using images I’ve previously added to the Media Library. You can select multiple images by holding down the
Command (on Mac) or
CTRL (on Windows) key. Selected images will get a small checkmark at the top right of the thumbnail.
Once you’ve selected the images to insert, click on the
Create a new gallery button.
On the next screen, you have the opportunity to refine the gallery. You can remove images (click on the X) and reorder them (drag and drop).
This step is the key part: click on the block type icon and choose Transform to Image.
That will take all of the images in the gallery and transform them into a series of individual images inserted inline.
Things Worth Knowing
There are some things worth noting about this workaround:
- This is specifically for the Gutenberg Block Editor. It won’t work with the Classic Editor (with the Classic Editor, you can select and insert multiple images as usual).
- I’m referring here to a series of individual images in the post. Obviously, another way to insert multiple images is to use some kind of gallery, whether the built-in gallery function or a plugin. But for various reasons, I prefer not to use galleries and tend to use a series of individual in-line images.
- One minor annoyance is that the process for selecting in a bulk way what image size is inserted in unreliable. With the Classic Editor, it would use the most recently used size, but I haven’t been able to get that to work with this method. If you edit the gallery and choose the alignment and size, the alignment will stick with the individual images, but the size results don’t always work. For me, for example, if I choose “Large”, I’ll often end up with what is actually the full resolution version. So in cases where I need a different size, I’ve had to go back on an image-by-image basis to select a different image size. Ditto on Alt text and styles.
- In these examples, I’m using WordPress 5.9. It’s quite possible that a future version of WordPress will add the multi-image functionality to the Block Editor.