Image Scroll Gallery

approvedunreviewed

by yujia

Render a group of images as one horizontal scrolling strip instead of a tall vertical stack, with upload, paste, drag to reorder and a full-screen viewer.

↓ 294 downloadsUpdated 16d agoMIT

Image Scroll Gallery

A group of images in Obsidian normally stacks straight down the page, so ten screenshots swallow ten screens of scrolling. This plugin renders a group as one horizontal strip of fixed height that you scroll sideways instead.

Use it

Run Insert image gallery from the command palette (or the ribbon icon). That drops a gallery block into the note. Select some image embeds first and they are wrapped into it:

```gallery
![[photo-1.png]]
![[photo-2.png]]
```

When an image is renamed or moved, the plugin rewrites the gallery lines itself.

Every gallery carries a small toolbar above the strip, always visible, with three ways to add images:

  • Upload — the OS file picker, or the photo library on mobile. Files land in your configured attachment folder.
  • Paste — takes an image straight off the clipboard. If the clipboard holds a format the browser API will not hand over (a macOS screenshot is often TIFF), the gallery arms itself and asks for a real Cmd/Ctrl+V instead.
  • From vault — fuzzy search over the images you already have, most recently modified first. One pick adds one image; click again for the next.

In the strip

ScrollTrackpad swipe, mouse wheel (vertical wheel moves it sideways), or the ‹ › buttons
EnlargeClick an image for a full-screen viewer; ← → to move, Escape to close
ReorderHover an image for ‹ › buttons, or drag it — on touch, press and hold first. The strip stays where it was and keeps the moved image in view
CopyThe copy button puts the image on the clipboard as a bitmap, ready to paste into anything
Show in FinderThe folder button opens the image's location in Finder or Explorer. Desktop only
RemoveThe bin button on the image. This drops the line from the gallery — your image file is untouched

Gallery options

A height: line overrides the global height for that one gallery:

```gallery
height: 180
![[photo-1.png]]
```

Wiki embeds, ![](path) links and plain image URLs all work. Anything the plugin does not recognise is left in the block untouched.

Settings

Gallery height, gap between images, scroll arrows, scroll snapping and rounded corners.

Name new images after the note

Off by default. When on, images added through a gallery are saved as Note name.png, then Note name-1.png and so on, instead of keeping the name they came with. Rename plugins such as Paste image rename usually do this, but they wait for a link in the note body, which gallery images do not have.

Gallery images property

Obsidian does not index anything inside a code block, so on its own a gallery's images do not count as links: a Bases file.embeds formula cannot see them, an image's backlinks miss the note, and tools that count references before deleting an image think it is unused.

Name a property under Gallery images property (off while empty) and every note's gallery images are kept in it as a list of [[links]], which Obsidian does index. It is updated automatically whenever a gallery changes: through its buttons, by typing in the block, or when an image is renamed. Remove the last gallery from a note and the property goes too. The note text is the source of truth, so edits made to the property by hand are overwritten.

After turning it on, run Update the gallery property in all notes once to fill it in for galleries you already have.

To use a gallery image as a Bases card cover, fall back to the property when a note has no ordinary image embed (here the property is called gallery):

formulas:
  cover: if(file.embeds.filter(value.containsAny("png","jpg","jpeg","webp")).length > 0, file.embeds.filter(value.containsAny("png","jpg","jpeg","webp"))[0], note["gallery"][0])

Known limits

  • Printing or exporting to PDF cannot scroll, so the strip wraps onto the page instead of scrolling.
  • Inside a hover preview the plugin cannot tell where the block sits in the file, so adding, reordering and removing are disabled there. Viewing and enlarging still work — open the note properly to edit.
  • Disabling the plugin leaves the block as a plain code block, showing the image links as text. Nothing is lost; turn the plugin back on to see the strip again.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.