Gilbert Hyatt219 downloadsA zero-setup masonry image gallery view for Bases.

Obsidian Bases Image Gallery is a zero setup masonry image gallery for Obsidian. This is based off the work by Luca Orio — Obsidian Image Gallery — but updated for the Obsidian Bases plugin. It makes it very easy to make a beautiful image gallery in your notes with very little effort.
Table of Contents
(ver >= 1.10.2) — the Bases core plugin must be available.Search for Bases Image Gallery in Settings → Community plugins → Browse.
Install it with BRAT:
ghyatt/obsidian-bases-image-gallery and click Add Plugin.BRAT auto-updates you to each new beta release. For full usage and testing notes, see BETA-TESTING.md.
Create an Obsidian Base (or place a Base in a note), and select the "Image gallery" view. To create a dynamic gallery, add a filter to select which images to show. The configuration Obsidian generates will look something like the examples below.
All images in vault
Images in directories below this note's parent

The gallery renders directly in the Base view as soon as the Base's filters select one or more images — there is no code block to trigger and no preview mode to switch to. Add or remove a matching image in your vault and the gallery updates live.


Clicking on an image will take you to a lightbox style screen.
In desktop you can click the X icon, or in mobile & desktop you can double click to exit back to the original masonry image display.
All options are set from the Base view configuration menu — there is no YAML to write by hand, and your choices are saved into the .base file automatically. Which images appear (and in what order) is controlled by the Base's own filters and sort, not by this view, so there are no path, sortby, or sort options.
| Option | Default | Range / Options | Applies to | Description |
|---|---|---|---|---|
| Layout | Vertical masonry |
Vertical, Horizontal | both | Masonry orientation. Vertical is the recommended default (see Notes). |
| Columns (desktop) | 3 |
1–10 | vertical | Number of columns on desktop. |
| Columns (mobile) | 2 |
1–6 | vertical | Number of columns on mobile. |
| Row height (px) | 260 |
50–1000 | horizontal | Height of each row. |
| Gutter (px) | 8 |
0–64 | both | Spacing in px between the images. |
| Corner radius (px) | 0 |
0–64 | both | Border radius in px of the images. |
A note about ordering in the vertical layout: until a true masonry layout is available for native css grids, the visual ordering is approximate — elements flow top-to-bottom within each column rather than strictly left-to-right (see this article for why). For most galleries this is fine; exact ordering is a known limitation of the CSS-column approach. The horizontal layout orders left-to-right more intuitively (justified rows) if strict ordering matters to you.
0.1.6
0.1.5
0.1.4
styles.css (error box, notice, view width, mobile control hiding); standard MIT LICENSE; tighter typing (removed any); use element ownerDocument; dropped the builtin-modules dependency.0.1.3
styles.css (configurable values passed as CSS custom properties).0.1.2
innerHTML clear with empty().0.1.1
id to bases-image-gallery for community-catalog compliance (ids cannot contain "obsidian").0.1.0
Provided AS IS — like most Obsidian plugins this is just a hobby for me, but I hope you find it useful. You can file bugs or feature requests on GitHub. Thank you for taking a look at my plugin!