Skip to content

Refresh Obsidian Image (experimental)

Overview

By default, when you change the images embedded in a Obsidian note, Obsidian would not detect the change of the embedded images in the note automatically. This operation is designed to force Obsidian to reload the embedded images in a note.

Note

Obsidian URI is a custom URI protocol supported by Obsidian that lets you trigger various action. Please follow the Obsidian URI to to register the Obsidian URI protocol on your computer. For Linux user, there is a good article about how to set it.

Note

This operation relies on the Obsidian Advanced URI plugin. Make sure to install and enable it in Obsidian before using this operation.

Configuration

Key Type Default value Description
filename string optional "{{xoppStem}}" The filename of the output images. (excluding the file extension)
You can use {{xoppStem}} to represent the stem name of the Xournal++ note.

In general, you would assign "filename" with the value same as that in "save" operation's "filename".

Example

config.json
{
    "pipeline": [
        {
            "type": "load",
            "config": {
                "paper_background_preserved": true,
                "trim": true,
                "trim_directions": [false, true, false, true],
                "trim_paddings": [0, 50, 0, 50]
            }
        },
        {
            "type": "combine",
            "config": {
                "direction": "ttb",
                "horizontal_align": "center"
            }
        },
        {
            "type": "save",
            "config": {
                "directory": "{{xoppDir}}",
                "filename": "{{xoppStem}}"
            }
        },
        {
            "type": "refreshObsidianImage",
            "config": {
                "filename": "{{xoppStem}}"
            }
        }
    ]
}

Demo