Better Live Preview Image

by Dong Yang
5
4
3
2
1
Score: 50/100

Description

The Better Live Preview Image plugin adds direct image alignment controls and callout image sizing that work inside Live Preview and Reading view. It lets you set left, center or right alignment from the image context menu, command palette or your own hotkeys, then stores that choice in Markdown image markers. It also applies width and height markers to images inside callouts, so rendered callouts respect the same sizing syntax without changing the note content itself. When an image uses the default alignment, the explicit marker is removed and the plugin's CSS handles the display while the plugin stays enabled. It is focused, local first and keeps image formatting visible even when you use the native edit block flow.

Reviews

No reviews yet.

Stats

3
stars
1,393
downloads
0
forks
34
days
35
days
35
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
9
commits

Latest Version

a month ago

Changelog

  • Adopt Obsidian's declarative settings API and raise the minimum supported app version to 1.13.0.
  • Remove default command hotkeys so users can assign conflict-free shortcuts themselves.
  • Use Obsidian DOM helpers for synchronized image sizing.
  • Replace broad CSS :has() selectors to avoid selector invalidation performance warnings.
  • Add a single-command release script with validation, commit, atomic push, and automatic GitHub release triggering.

README file from

Github

Better Live Preview Image

Better Live Preview Image improves image alignment and callout image sizing in Obsidian.

Features

Better Live Preview Image currently has two features:

  1. Image alignment: Align images left, center, or right from the image context menu, command palette, or user-assigned hotkeys.
  2. Callout image size markers: Apply Obsidian image width and height markers to images inside callouts in Live Preview and Reading view.

Usage

Right-click an image in Live Preview or Reading view and choose one of:

  • Align image left
  • Align image center
  • Align image right

You can also run these commands from the command palette:

  • Better Live Preview Image: Set current image left aligned
  • Better Live Preview Image: Set current image centered
  • Better Live Preview Image: Set current image right aligned

The plugin does not reserve default hotkeys. To assign shortcuts, use Obsidian's built-in Settings -> Hotkeys page and search for Better Live Preview Image.

When you use Obsidian's native Edit this block button, the image remains visible with its current alignment while the Markdown source is shown.

Callout Image Size Markers

Enable Apply image size markers inside callouts in the plugin settings. When enabled, images inside callouts use Obsidian width and height markers in Live Preview and Reading view:

> [!info] Example
> ![[image.png|240]]
> ![[image.png|240x160]]

This setting is enabled by default. Turning it off removes only the plugin-applied inline sizing from rendered callout images; it does not modify your Markdown.

How Data Is Stored

Alignment is stored as an image alt marker:

![[image.png|left]]
![[image.png|center|300]]
![[image.png|right|500x300]]
![left|caption|300](https://raw.githubusercontent.com/ydd0729/better-live-preview-image/HEAD/image.png)

When an image matches the default alignment configured in the plugin settings, the explicit alignment marker is removed. The plugin's CSS then applies the default alignment while the plugin is enabled.

Settings

  • Default image alignment: Choose the alignment used for images without an explicit left, center, or right marker.
  • Apply image size markers inside callouts: Make callout images honor Obsidian width and height markers in Live Preview and Reading view.

Notes And Limitations

  • The plugin is designed for Markdown image embeds and standard Markdown image links.
  • The context menu integration targets rendered images in Live Preview and Reading view.
  • Alignment is implemented with CSS classes and Markdown alt markers. If you disable the plugin, explicit markers remain in your Markdown, but the default alignment setting no longer applies.

Privacy

Better Live Preview Image runs entirely inside your vault. It does not use network access, telemetry, ads, accounts, or external services.

Installation

After the plugin is published, install it from Settings -> Community plugins -> Browse and search for Better Live Preview Image.

Obsidian 1.13.0 or later is required.

For manual installation, copy these files into .obsidian/plugins/better-live-preview-image/:

  • manifest.json
  • main.js
  • styles.css

Then enable Better Live Preview Image from Settings -> Community plugins.

Support

If you find a bug, include:

  • The image Markdown before and after the action
  • Whether you used the context menu, a command, a hotkey, or Obsidian's native edit button
  • Your Obsidian version

Development

pnpm install
pnpm run lint
pnpm run build

Releasing

Update manifest.json, package.json, versions.json, and CHANGELOG.md, then run:

pnpm run release

The script validates the release, runs lint and the build, commits all repository changes, creates the version tag, and atomically pushes main and the tag. The tag triggers the GitHub Actions release workflow. The default commit message is Release <version>; override it with --message:

pnpm run release -- --message "Describe the release"

To validate everything without committing, tagging, or pushing:

pnpm run release -- --dry-run

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Adapt to Current View
a year ago by greetclammy
Obsidian plugin to set different accent colors for Reading view, Live Preview and Source view.
Admonition
5 years ago by Jeremy Valentine
Adds admonition block-styled content to Obsidian.md
Alignment Tracker
2 years ago by LittleOwl
This is a plugin made for Obsidian to thrack a character's alignment.
Better Link Clicker
8 months ago by Eniverz
An Obsidian plugin that modifies the default link click event.
Blockier
3 years ago by blorbb
An Obsidian.md plugin for easier block editing.
Callout Copy Buttons
2 years ago by Aly Thobani
An Obsidian plugin that adds copy buttons to callout blocks in your notes.
Callout Integrator
4 years ago by
A plugin for Obsidian to allow the integration of long blocks of text into callouts.
Callout Manager
4 years ago by eth-p
An Obsidian.md plugin that makes creating and configuring callouts easy.
Callout menu
2 years ago by Anareaty
Callout Studio
2 months ago by niv20
Callout Studio is the only callout plugin you'll ever need to download. It offers regular callouts, inline callouts, and callout headings. Plus, you can easily design your own custom styles!
Callout Suggestions
2 years ago by Casey Fryer
Obsidian Plugin for autocompleting callouts.
Callout Toggles
2 years ago by Aly Thobani
An Obsidian plugin to quickly add, change, or remove callout wrappers in your notes.
CalloutX
2 years ago by br4in
An Obsidian plugin that allows you to view, manage, and customise callout icons in your vault.
Citation Callouts
a year ago by Michael Marvive
Obsidian Plugin that formats a quote with a citation in a custom callout
Comments
a year ago by Jasper Surmont
Custom Theme Studio
a year ago by @gapmiss
An Obsidian.md plugin to create and tweak custom themes with live CSS editing, element styling, and instant previews. All without leaving Obsidian.
Dayframe
a month ago by Ganessh Kumar R P
🖼️ like a picture frame but for your daily notes.
Dynamic Text Concealer
3 years ago by Matt Cole Anderson
Obsidian.md Plugin to conceal or replace user configured text patterns in Live Preview and Read Mode.
Edit mode switch
2 years ago by Mara-Li
Add a button in file header to switch between LP & Source while editing
Image Embedder
a year ago by Natalie Sumbo
Image Tools
2 years ago by Andrey Serov
Inline Admonitions
3 years ago by Scott Tomaszewski
List Callouts
4 years ago by mgmeyers
Create callouts in lists in Obsidian.
Livecodes Playground
2 years ago by @gapmiss
Open-source client-side code editor plugin for Obsidian.md - powered by LiveCodes.io
Mode manager
2 years ago by dk949
Better management of reading/editing modes in obsidian
MP Publisher
2 months ago by joeytoday
自定义主题预览,并发布到公众号草稿箱。
Negative Heading
6 months ago by Ashan Devine
Plugin for Adding Discord Style Negative Headings to Obsidian
Obsidian Columns
4 years ago by Trevor Nichols
Power Editor
a month ago by Power Plugins
Format any note from a toolbar, selection bubble, or slash menu: WYSIWYG editing, block drag handles, image resizing, dictation, and AI edits, all staying plain Markdown.
TableTune
17 days ago by niizhou
Tune your Obsidian tables: drag column/row borders to resize; sizes remembered per table; content-aware defaults; clean single-scrollbar reading view.
YAML Table
a year ago by dainakai