
A gallery page is usually the heaviest page on a site. The good news: almost all of that weight comes from a few habits that are easy to change. Here is what actually makes a WordPress gallery slow and what to do about it, in order of impact.
1. Upload the right size, not the original
A photo straight from a modern camera or phone is 4000–8000 px wide and 5–15 MB. No screen needs that. For galleries, 1200–2000 px on the long side is enough for retina displays and a full-screen lightbox, and compressed JPEG or WebP at that size is usually 200–600 KB.
Resize before uploading, or let an image optimisation plugin do it on upload. Avoid files over 3–4 MB in a gallery.
2. Thumbnails should be thumbnails
The grid should never load the full-size file. WordPress creates smaller copies of every upload (thumbnail, medium, large), and a gallery should use the one that matches the tile size.
In Robo Gallery the source size for thumbnails is set in the gallery's size options: choose medium or large for typical grids, and keep full for the lightbox only. Because thumbnail sizes are calculated from the layout and column settings, you set an aspect ratio and a source size and the plugin does the rest.
3. Load images when they are needed
Lazy loading loads an image only when it is about to scroll into view. On a gallery of 60 photos, the first screen might need 9.
For long galleries, go one step further and do not render everything at once. Load More (a button that adds the next batch), classic pagination or infinite scroll keep the first page small. In Robo Gallery, lazy loading is in the gallery's Loading Options, and Load More, pagination and infinite scroll are in the navigation settings.
A good default: 12–24 images on first load, then Load More.
4. Cache the gallery and the page
There are two layers of caching and they help in different ways:
- The gallery cache stores the prepared gallery data so WordPress does not rebuild the layout on every visit. In Robo Gallery turn it on in Gallery → Options → Cache; it regenerates automatically when you change the gallery.
- A page cache (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache) stores the whole finished page. Remember to clear it after editing a gallery.
A CDN can serve images from a server near the visitor. Robo Gallery does not have a built-in CDN integration yet; site-wide CDN setups often work, but test galleries after enabling one.
5. Split huge galleries
A single gallery with 1,000 photos is slow to edit and slow to browse. Split it into albums (by place, date or project) and let visitors drill down. It helps speed and it helps people find things. Our guide to nested albums shows how.
6. Measure before and after
Open the gallery page in PageSpeed Insights and look at three numbers:
- Largest Contentful Paint: how soon the main image appears. Under 2.5 s is good.
- Total page weight on first load. A gallery page under 2–3 MB is healthy; 20 MB means full-size files are being loaded.
- Cumulative Layout Shift: whether the grid jumps while images arrive.
Change one thing at a time and measure again. If the page is still slow with small images, lazy loading and a cache, the cause is usually elsewhere: hosting, the theme or other plugins.