Blogging & content · Info
WordPress Gallery Settings Explained: What Each Option Does

Short answer
WordPress gallery settings are the Gallery block options for columns, cropping, image resolution, what clicking an image does, random order, captions and spacing. Each image also has its own settings such as alt text. Site-wide image sizes used by galleries are set in Settings > Media.
Key takeaways
- Columns sets images per row, and phones show fewer automatically.
- Crop images to fit makes even tiles but can trim photo edges.
- Resolution picks which stored image size loads, which affects speed.
- Link to controls clicks: none, media file, attachment page or a lightbox.
- Every gallery image is an Image block with its own alt text and caption.
What are the WordPress gallery settings?
WordPress gallery settings are the options in the Gallery block that control columns, cropping, image size, links, captions, order and spacing, plus the site-wide image sizes in Settings > Media.
The core Gallery block lets you show several images in a grid without a plugin. When you select the block, its settings appear in the sidebar and the toolbar. Each image inside the gallery is also an Image block with its own settings.
Here is a quick map of what each main setting does:
| Setting | Where it is | What it does |
|---|---|---|
| Columns | Gallery sidebar | Sets how many images sit in each row |
| Crop images to fit | Gallery sidebar | Trims images so every tile matches |
| Resolution | Gallery sidebar | Chooses which image size WordPress loads |
| Link to | Gallery sidebar or toolbar | Decides what happens when someone clicks an image |
| Randomize order | Gallery sidebar | Shuffles images on each page load |
| Captions | Toolbar and each image | Adds a gallery caption and per-image captions |
| Block spacing, color, border | Styles tab | Controls gaps and appearance |
The official Gallery block documentation shows each control with screenshots. Option names can shift slightly between WordPress versions.
What does the Columns setting do?
Columns sets the maximum number of images shown side by side in each row, and WordPress reduces it on smaller screens so the grid stays readable.
The default depends on how many images you add, up to a limit. With three images, you get three columns. With many images, the default stops at a sensible number, and you can raise or lower it with the slider.
On phones, galleries usually fall back to fewer columns. That keeps each image large enough to see. Two or three columns works well for most content galleries. Four or more suits small thumbnails like logos or product swatches.
What does Crop images to fit do?
Crop images to fit trims images so every tile in a row has the same height and shape, which gives a neat grid but can cut off edges of photos.
With cropping on, portrait and landscape photos are trimmed to fill their tiles evenly. This looks tidy, especially with mixed photo shapes.
With cropping off, each image keeps its full shape. Rows can then look uneven, but nothing is cut out. Turn cropping off for artwork, diagrams or screenshots where every edge matters.
If a key part of a photo keeps getting cropped, edit the original image to center the subject, or switch cropping off for that gallery.
What does the Resolution setting control?
Resolution chooses which stored size of each image the gallery loads, such as thumbnail, medium, large or full size, which affects sharpness and page speed.
When you upload an image, WordPress creates several copies at different sizes. Those sizes are set in Settings > Media, as explained in the Media Settings screen documentation.
| Size | Typical default | Good for |
|---|---|---|
| Thumbnail | 150 x 150, cropped | Tiny tiles, many columns |
| Medium | Up to 300 x 300 | Small galleries |
| Large | Up to 1024 x 1024 | Most content galleries |
| Full size | Original upload | Rarely needed in a grid |
Choose the smallest size that still looks sharp at your column width. Large is a safe default for two or three columns. Full size can slow pages down because originals are often very big. Our guide on how to properly size images in WordPress helps you pick dimensions.
WordPress also adds responsive image markup, so browsers can pick a smaller file on small screens when one is available. It lazy loads many images too, which our guide on how to lazy load images in WordPress explains.
What does the Link to setting do?
Link to decides what happens when a visitor clicks a gallery image: nothing, open the image file, open its attachment page, or enlarge it in a lightbox in recent versions.
The usual options are:
- None: images are not clickable
- Media File: clicking opens the full image file in the browser
- Attachment Page: clicking opens a page for that single image
- Enlarge on click: opens the image in a built-in lightbox overlay, where your WordPress version offers it
Attachment pages are turned off by default on new sites since WordPress 6.4, as explained in the Make WordPress Core note on attachment page changes. On those sites, links to attachment pages redirect to the file itself.
When you link to the media file, you may also see an option to open links in a new tab. Lightbox plugins often hook into the Media File option to show images in a popup.
What does Randomize order do?
Randomize order shuffles the images each time the page loads, so visitors may see a different arrangement on every visit.
This works well for logo walls, testimonial photos or portfolio teasers where order does not matter. It is a poor choice for step-by-step photos or before and after pairs.
If your site uses full-page caching, the order may only change when the cache refreshes. Visitors would then see the same shuffled order until the cache clears.
How do gallery captions work?
The Gallery block can show one caption for the whole gallery and a separate caption on each image, and both are added through the toolbar or by clicking under the images.
Image captions come from what you type on each image, not always from the caption field in the Media Library. Check them after inserting the gallery.
Captions usually sit over the bottom of each image in many themes. Long captions can cover a lot of the photo, so keep them short. If your theme styles them poorly, you can turn off image captions for the whole gallery from the toolbar.
What settings does each image in a gallery have?
Each image inside a gallery is an Image block, so you can set its alt text, caption, link, crop and filters individually.
Click any single image to see its own settings. The most important one is alt text, which describes the image for screen reader users and search engines. The W3C's alt text decision tree helps you write it.
You can also replace a single image, move it left or right, or remove it without rebuilding the gallery.
What do the style settings do?
The Styles tab controls the gap between images, background color, borders and corner radius, depending on what your theme supports.
Block spacing sets the gap between tiles. A small gap looks modern and tight. A larger gap gives each image room to breathe.
Borders and rounded corners can soften a gallery or match buttons elsewhere on your site. Themes decide which of these options appear, so you may see fewer controls in some themes.
How do the classic gallery shortcode settings compare?
The older gallery shortcode, still supported, uses attributes such as ids, columns, size and link to control the same things as the Gallery block.
Sites built with the Classic Editor may still use it. Our explainer on what a shortcode is in WordPress covers how shortcodes work. A typical shortcode looks like this:
[gallery ids="12,15,18" columns="3" size="medium" link="file"]
The gallery shortcode reference lists every attribute and its default. If you are converting old posts, the block editor offers to convert a classic gallery into a Gallery block.
Which gallery settings should you use?
For most posts, use two or three columns, crop on, large resolution, alt text on every image and a lightbox or media file link.
A few practical presets:
- Blog photo set: 3 columns, crop on, large size, enlarge on click
- Portfolio: 2 columns, crop off, large size, captions on
- Logo wall: 4 to 6 columns, crop off, medium size, no links
- Product details: 3 columns, crop on, large size, media file links
Keep galleries fast by compressing images before upload. Our guide on how to optimize images for WordPress explains compression and modern formats.
If you need albums or advanced layouts, a plugin may suit you better, and our guide on how to add NextGEN Gallery in a WordPress page shows one option.
Frequently asked questions
Where are the gallery settings in WordPress?
Select the Gallery block in the editor. Its settings appear in the right sidebar and the block toolbar. Click a single image inside it to see that image's own settings, such as alt text and caption.
How do I make WordPress gallery images open in a lightbox?
In recent WordPress versions, set Link to as enlarge on click if your version offers it. Otherwise, link images to the media file and use a lightbox plugin that opens those links in an overlay.
Why are my gallery images cropped?
Crop images to fit is turned on, which trims images to equal tiles. Turn it off in the Gallery block sidebar to show each image in its full shape, though rows may look uneven.
How do I change the number of columns on mobile?
The core Gallery block reduces columns on small screens automatically and has no separate mobile column setting. For exact control, add custom CSS with a media query or use a gallery plugin.
Do gallery settings affect page speed?
Yes. The resolution setting decides which image size loads, and full-size images can be very heavy. Choose the smallest size that looks sharp, compress uploads, and keep the number of images reasonable.
Sources
- Gallery block WordPress.org Documentation
- Media Settings Screen WordPress.org Documentation
- Changes to attachment pages Make WordPress Core
- gallery_shortcode() WordPress Developer Resources
- An alt Decision Tree W3C Web Accessibility Initiative
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


