Skip to content

Demo vault

Every screenshot and code block on this page comes from the bundled demo vault.

Download the English demo vault

Resize, align and reset ​

Drag the bottom-right grip to change a single image's width, click the arrows beside it to change alignment; both write parameters instead of touching the file structure.

The corner grip ​

markdown
![Castle|ag:width=46%|ag:side=right](assets/photo/10-castle.jpg)

Dragging the corner grip writes ag:width on release.

Hover the bottom-right corner, then drag: the image scales proportionally, and on release ag:width is written and the current alignment is pinned.

  • One drag produces one undo step.
  • The caption widens together with the image, so text and picture never fall out of step.
  • Double-click the grip to clear ag:width and return to automatic width, keeping ag:side.

Alignment arrows ​

On the empty side of an image a ‹ or › arrow appears: the left one aligns left, the right one aligns right; a centred image shows one on each side.

Clicking writes both ag:side and the current width — otherwise automatic routing could move a narrowed image back to the centre.

A full-column image shows no arrows: it has nowhere to move. If the image is so wide that an arrow cannot fit in the free space, the arrow is drawn inside the image and only appears on hover.

Where gestures do not work ​

SituationWhyInstead
Gallery cellsthe row decides the width, the grip is suppresseddrag the divider, see Gallery handles
Images in list itemsno grip, no arrowswrite ag:width by hand
Table cellsthe table decides the widthonly ag:crop applies
Reading viewgestures exist only in Live Preview—

Turning them off ​

Two settings disable both controls:

SettingDefaultWhen off
Drag-to-resize in Live Previewonthe corner grip is left to Obsidian
Show alignment arrowsonno ‹ › appear

ag:width and ag:side can still be written by hand; only the mouse entry points disappear.

Clearing manual tweaks ​

  • One image: the "Clear image caption and layout" command.
  • The whole note: "Restore document default image style", one undo step.

See Dialog and reset.

Next ​