How to create a photo gallery with the block editor with Modula Gallery
Galleries are a great way to break the monotony of continuous text, they can make your articles appear less daunting and more appealing to the average reader. They can also help readers visualize concepts you are writing about and of course they can be great assets when it comes to promoting products or services. All the above reasons make inline galleries a great asset for any content creator out there. In today’s installment of our block editor related articles we will be using the Modula Gallery plugin to help us create and use galleries in our content.
Table of contents
Modula Gallery is a free gallery plugin which offers fully responsive, customizable and fast galleries for your WordPress site. It comes with a neat little feature called custom grid which allows you to easily customize your gallery’s layout and image aspect ratio to create galleries just like you want them.
The plugin is distributed via the WordPress plugin directory. To install it navigate to Plugins > Add New search for Modula Gallery and click the install button, once the plugin is installed click the activate button to activate it and you are good to go.
Modula Gallery does not offer much in terms of global options, the only interesting one would be the ability to migrate existing galleries from plugins such as Envira, NextGEN and FooGallery. This can be done under Modula > Migrate in the WordPress dashboard. This can help you be up and running with the plugin much faster if you were previously using any one of the previously mentioned gallery plugins.
Creating a gallery
To create a new gallery simply navigate to Modula > Add New and you will be presented with the new gallery creation screen.
Start by adding a title for your gallery and choose if you want to upload new images or select existing ones from the WordPress media gallery, both these procedures are handled through the familiar WordPress media manager interface. Once you are done with uploading or selecting images you will be presented with a preview of your gallery.
You can hover over any of the added images to edit its alt, caption, alignment and URL, you can also remove any image from the gallery. Now that the images are taken care of let’s move to the gallery options.
Modula Gallery offers quite a few customization options for a free plugin, although most of the tabs are exclusive to the pro version but still visible to the free users. You can control the gallery’s appearance by setting width, height, gutters, thumbnail size and image shuffle. You can also customize the captions, add social sharing links, toggle loading and hover effects, add custom CSS and toggle lazy loading for larger galleries.
Under General settings you can select the gallery type. There are three available options, the creative gallery which is an automatic masonry based layout, the classic columned one and the quite interesting custom grid type. If you choose to use the custom grid layout you can drag to resize your images and create a mosaic just the way you want it.
Once you are done customizing the gallery go ahead and save it.
The Modula Gallery block
Modula Gallery offers a custom block which can be used to add any gallery you’ve created in your content. To find the block just search for gallery in the block selector.
From the results pick the Modula Gallery block to add it in the content.
From the block’s drop down pick the gallery you want to use.
The block itself does not offer any options worth mentioning, there is a dropdown to change the selected gallery and the classic edit block button which will take you to the gallery edit screen we saw earlier.
Now that you’re done with adding the gallery to the content you can publish or update your post and check it out.
As you can see our gallery looks exactly like the custom grid we have created earlier allowing us to highlight some images more than others and create unique galleries very easily.
The core gallery block
You don’t necessarily need a third party plugin just to create a gallery in WordPress. There is a core gallery block which is suitable for most everyday gallery creation needs. To add the block simply search for Gallery in the block inserter and pick the gallery block.
You can choose to either upload new images directly from your computer or create a gallery using photographs already uploaded to the WordPress media gallery. In both cases the procedure is done through the familiar interface of the WordPress media manager.
Once the images are added and the gallery is created you can modify its appearance. The core gallery block offers column number options, optional image crop, customizable image linking and thumbnail size.
The configuration options are pretty simple and can be completed in no time. After that you are ready to publish the post and check out your brand new gallery.
Modula Gallery is another pretty handy third party plugin to help you manage your galleries. Its custom grid and ability to import existing galleries from popular gallery plugins make it a very interesting choice. However if you are just looking to place a few images along your content and don’t have the need of an advanced gallery management solution make sure to check out the gallery core block which can be pretty handy for such a case.