saltyfireball103 downloadsDisplay banner images at the top of notes using frontmatter fields. Supports vault images, external URLs, custom height, opacity, vertical positioning, and gradient transparency.
Display banner images at the top of your notes using frontmatter fields.
[[image.png]]), or external URLsThis plugin is available in the official Obsidian community plugin directory. Install it from Settings > Community plugins > Browse and search for "Banner Images" or "Banner Images by saltyfireball".
banner_image to your note's frontmatter manually, or use the command palette (Ctrl/Cmd+P) and run Banner Images: Insert banner frontmatter to insert all available fields automatically:---
banner_image: path/to/your/image.png
---
The command will add only missing banner fields if frontmatter already exists.
| Field | Type | Default | Description |
|---|---|---|---|
banner_image |
string | -- | Path to image file (required). Also accepts backdrop or banner as field names |
banner_height |
number | 200 | Height of the banner in pixels |
banner_opacity |
number | 1 | Opacity from 0 (transparent) to 1 (fully visible) |
banner_offset |
string/number | center | Vertical position: top, center, bottom, or a percentage like 20% |
banner_gradient |
boolean | false | When true, fades from full opacity at top to selected opacity at bottom |
banner_fit |
string | none | Image fit mode: none (cover), fit_height, or fit_width |
Basic banner:
---
banner_image: attachments/header.jpg
---
Full customization:
---
banner_image: attachments/landscape.png
banner_height: 300
banner_opacity: 0.7
banner_offset: 30%
banner_gradient: true
banner_fit: fit_width
---
Using a URL:
---
banner_image: https://example.com/image.jpg
banner_height: 250
---
Using wikilink syntax:
---
banner_image: "[[my-banner.png]]"
---
The banner_fit field controls how the image is sized within the banner area:
none (default) -- The image covers the entire banner area. Parts of the image may be cropped to fill the space.fit_height -- The image scales so its full height is visible within banner_height. The image is centered horizontally, and the sides may be cropped if the image is wider than the banner area.fit_width -- The image scales so its full width matches the banner width. Resizing the window effectively zooms in or out. The top/bottom may be cropped based on banner_offset.attachments/banner.png[[image.png]]https://example.com/image.pngAccess settings via Obsidian Settings > Banner Images:
banner_height is not set in frontmatter)banner_opacity is not set)banner_offset is not set)banner_fit is not set)This plugin uses the banner_image frontmatter key by default. For compatibility with other banner plugins, it also reads the backdrop and banner fields.
This plugin exposes its default settings so that other plugins (such as export tools) can read the user's configured defaults. The API is accessible via the standard Obsidian plugin registry pattern:
// Access from another plugin
const bannerPlugin = (app as any).plugins?.plugins?.["banner-images"];
const defaults = bannerPlugin?.api?.getDefaults();
The getDefaults() method returns an object with the current default settings:
| Property | Type | Description |
|---|---|---|
height |
number | Default banner height in pixels |
opacity |
number | Default opacity (0 to 1) |
offset |
string | Default vertical position (e.g. "center", "30%") |
gradient |
boolean | Whether gradient transparency is enabled by default |
fit |
string | Default fit mode ("none", "fit_height", or "fit_width") |
If the banner-images plugin is not installed or not enabled, callers should provide their own fallback defaults. Always use optional chaining when accessing the API.
This plugin is released under the MIT License.