How to Center Images in WordPress Gallery

imagesWordpress

Inherently, inserting images in WordPress galleries puts the given images to the left most in their respective zones. When working with different sizes of image, this makes large images "stick" to the next image, while other smaller images do not. A solution to this would be centering the images.
Can this be done through some plug-in ?

Best Answer

Classic Editor

When working in the Classic Editor you can not by default.
You will have to use some lines of custom CSS code (depending on your theme, layout etc).
As an alternative you can use one of the plenty available gallery plugins
(I would personally go with the custom css since it is a very simple thing you ask for)

Blocks (Gutenberg editor)

When working with blocks you can center align your gallery block through an option as shown in the image

Center WordPress Gutemberg Gallery

Related Topic