How to create photo galleries in WordPress
WordPress can create a basic photo gallery without a plugin using the Gallery block. Upload or select your images, arrange them, choose columns and decide whether clicks open a lightbox. Use a plugin when you need albums, watermarks or advanced gallery layouts.
- 01Prepare your photos
- 02Add the Gallery block
- 03Arrange and caption images
- 04Set the gallery layout
- 05Choose what clicks do
- 06Use a plugin for more control
What you need
- A WordPress site with editor access
- The photos you want to publish
- Optimised image files with useful filenames
Prepare your photos
Resize very large images before uploading and use descriptive filenames. Add alt text and captions where they help visitors understand the image; the Media Library stores both fields with the image.
Keep the original files backed up. WordPress can crop images for a gallery display, but a crop does not replace a properly sized source image. If thumbnails look soft, check the selected image resolution and whether an optimisation or caching tool has reduced quality.
Add the Gallery block
Edit the page or post where the gallery should appear, place the cursor where you want it, select the block inserter, and add Gallery. You can also type /gallery in the editor.
Choose Upload for new photos or Media Library for images already on the site. You can select multiple images and drag them into a different order before publishing.
Arrange and caption images
Use the gallery controls to move images left or right, remove unwanted images, and add captions to individual photos. A caption for the whole gallery is also available from the block toolbar.
Do not rely on captions as a substitute for alt text. Captions are visible explanations; alt text describes the image for people using assistive technology.
Set the gallery layout
Select the Gallery block and choose the number of columns, image resolution and whether to crop images to fit. Cropping gives each item a more uniform shape, which is useful when portrait and landscape photos are mixed, but it can remove important parts of an image in the thumbnail.
Preview the page on a phone as well as a desktop. If a subject is cut off, turn cropping off or edit the source image so the important area stays visible.
Choose what clicks do
In the gallery link settings, choose Enlarge on click for WordPress’s built-in lightbox, Media files to open the original file, an attachment page, or None if the images should not be links. The built-in lightbox keeps visitors on the page while showing a larger image.
Check the published page, not only the editor. A theme or another lightbox plugin can interfere with click behaviour, and using two lightboxes can produce conflicting pop-ups. If the image opens cropped or the lightbox does not appear, temporarily disable the competing feature and test again.
Use a plugin for more control
The manual Gallery block is fine for a small number of straightforward galleries. Choose a gallery plugin when you need reusable albums, tags, watermarking, image protection, proofing, WooCommerce integration, or more control over lightboxes and layouts.
Fast way: Envira Gallery - Premium WP Gallery Plugin provides a drag-and-drop gallery builder with templates, albums, tags, responsive layouts, lightboxes, watermarks and WooCommerce support. Create the gallery in its builder, configure the display, then insert it into the page using the plugin’s provided gallery block or insertion control.
Let Envira Gallery - Premium WP Gallery Plugin do it
Drag-and-drop galleries with albums, lightboxes, watermarks, and WooCommerce support for photographers needing more than a basic gallery block.
Sources
- wordpress.org /documentation/article/media-library-screen/?utm_source=open…
- wordpress.org /documentation/article/gallery-block/?utm_source=openai
- wordpress.org /support/topic/gallery-block-expand-on-click-not-working/?ut…
Questions
- Can I create a photo gallery in WordPress without a plugin?
- Yes, the built-in Gallery block is enough for a basic photo gallery. Add the block, upload or select images, reorder them, choose columns, set the image resolution and decide whether images enlarge on click. You only need a plugin when you require features such as albums, watermarks, proofing, advanced layouts or more specialised lightbox controls.
- Why are my gallery images blurry?
- Blurry gallery images usually mean the displayed thumbnail is smaller than the space it fills, the selected resolution is too low, or an optimisation or caching tool has compressed the image. Check the Gallery block’s Resolution setting, upload a sufficiently large source image, clear caches, and inspect the published page on the affected device.
- How do I make all gallery thumbnails the same size?
- Select the Gallery block and enable its crop-images option. WordPress will crop the displayed gallery images to make rows more uniform, which is useful for mixed portrait and landscape photos. Check the result carefully because cropping can remove faces, products or other important parts of the frame.
- How do I open gallery images in a lightbox?
- Select the Gallery block, open its link settings and choose Enlarge on click. This uses WordPress’s built-in lightbox and keeps visitors on the page while showing a larger image. If it does not work, check whether your theme or another lightbox plugin is overriding the setting, and avoid running two lightbox systems together.
- Should I use a plugin for a photography portfolio?
- Use the built-in Gallery block for occasional galleries with simple captions and lightbox viewing. A plugin is more suitable for a photography portfolio that needs albums, tags, watermarking, image protection, proofing, WooCommerce sales or more control over gallery layouts. This avoids rebuilding each gallery manually as the portfolio grows.