Enhanced Galleries
One Bricks element, Enhanced Gallery, with five layouts, a lightweight lightbox with deep links, galleries built from queries, filtering, EXIF data tags and ImageGallery schema.
Version: 0.5.5 · Requires: WordPress 6.5+, PHP 8.1+, Bricks · See the live demos
What it does
- Five layouts. Mosaic, Justified rows and Masonry never crop a photo.
- Built-in lightbox with arrow keys, swipe, focus trapping and shareable deep links.
- Galleries from hand-picked images, the media library, posts or ACF fields.
- Optional filter buttons, load-more batches, hover overlays and blur-up placeholders.
- Camera data (EXIF) as dynamic data tags and as an optional line in the lightbox.
- ImageGallery JSON-LD and image sitemap entries.
Installation
- In WordPress admin go to Plugins → Add New Plugin → Upload Plugin.
- Choose the zip and click Install Now (tick Replace current with uploaded when updating).
- Activate, then find Enhanced Gallery in the Media group in the Bricks builder.
Layouts
- Uniform grid — Photos that all share one ratio (3:2 default) — Cropped to fill, or shown whole on a backdrop past the crop limit
- Justified rows — Mixed portrait and landscape — None
- Mosaic (default) — Mostly landscape plus some portraits, 12+ photos — None; consecutive landscapes can stack in pairs
- Masonry — Portrait-heavy sets — None; column bottoms are ragged
- Featured plus thumbnails — Landscape sets with one hero image — Cropped in the stage and thumbnails
Limits: Mosaic and Justified need enough photos to balance rows (with three or four, a row can hold one photo). Panoramas wider than about 3:1 fill a row alone.
Settings
Source
- Source — Images I pick (default), Media library, Posts, ACF field. Queried galleries update themselves. Capped at 500 photos.
- Post types — Posts source only. Comma-separated slugs.
- Taxonomy / Terms — Media library default taxonomy is
beg_category;beg_tagis Gallery tags. - Match — Any (default), All
- ACF field on each post / ACF field name / Read the field from —
current, a post ID, oroption. - Maximum images — 24, non-manual sources.
- Order by / Direction — Date (default), Title, Last modified, Menu order, Random · DESC/ASC
Layout
- Layout — Mosaic (default). See Layouts above.
- Photos that do not suit their cell — Blurred backdrop (default), plain background, always crop. Uniform grid only.
- Crop limit (%) — Photo shown whole if cropping would remove more than this.
- Aspect ratio — 3:2, 4:3, 1:1, 5:4, 16:9, 21:9, 3:4, 2:3. Not used by Justified, Mosaic or Masonry.
- Gap, Corner radius — Any CSS length;
clamp()and variables work. - Columns / tablet / mobile — 3 / 2 / 1. Uniform and Masonry.
- Stack pairs of landscapes — Yes where it fits (default), No. Mosaic only.
- Row height (px) — 240. Justified and Mosaic.
- Thumbnails — Below (default), Beside. Featured only.
- Tablet width / Mobile width (px) — 1000 / 640, based on the gallery’s own width, not the screen.
Links and lightbox
- Link images to — Built-in lightbox (default), BricksExtras Dynamic Lightbox, full-size file, source post, nothing. BricksExtras needs its Dynamic Lightbox element on the page: Content = Custom (Links), Grouping on, selector
[data-x-lightbox-link]. - Deep links — On. Page address becomes
#gallery-name/photo-name. - Gallery name — auto. Letters, numbers, hyphens; unique per gallery on a page.
- Copy link button — Off
- Zoom, Thumbnail strip, Fullscreen, Slideshow (seconds per photo, default 4), Download — Off. Download gives the full-size file.
- Share on / Device share sheet / Print button — Pinterest, Facebook, X, WhatsApp, Email. Shares the open photo.
Filtering, loading and display
- Show filter buttons — Off. Not for Featured. Taxonomy to filter by, and first button label.
- Show photos in batches — No (default), Load more button, Load more on scroll. Photos per batch default 12; all photos stay in the page HTML.
- Text over photos — None (default), On hover or focus, Always. Shows title, caption, camera line or terms; bottom strip or centred. Touch devices always show it.
- Placeholder while loading — None (default), Blurred preview
- Hover zoom — 1.03. Set to 1 for none. Respects reduced motion.
- Images loaded straight away — 2. Use 0 below the fold.
SEO and camera data
- Output ImageGallery schema (default: On) — also adds images to the image sitemap.
- Show camera line in lightbox (default: Off) — camera, lens, focal length, aperture, shutter, ISO, date taken. GPS is never shown.
Camera data tags
Work in any Bricks element, inside an attachment loop or with the featured image. Add :ID for a specific attachment, e.g. .
Focal point
Focal points come from the free Media Focus Point plugin: click the subject in the media library and the gallery reads the saved position (60% 40%). Used only where a layout crops (Uniform grid with Always crop to fill, Featured). Images with no focal point are centred.
Tools
wp beg backfill-lensreads lenses for existing images.wp beg backfill-lqipbuilds placeholders for existing images (--redoto rebuild).
Known limits
- Watermarking is planned, not available.
- Masonry falls back to a plain grid without JavaScript.
- Filtering and batches are not used by Featured plus thumbnails.