plugins.obsidian.settings.workspaces.*.overrides.attachments.confirm_img_paste

Whether to prompt for confirmation when pasting an image.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.obsidian.settings.workspaces.*.overrides.attachments.img_folder

The default folder to place images in via :ObsidianPasteImg.

If this is a relative path it will be interpreted as relative to the vault root. You can always override this per image by passing a full path to the command instead of just a filename.

Plugin default: "assets/imgs"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.obsidian.settings.workspaces.*.overrides.attachments.img_text_func

A function that determines the text to insert in the note when pasting an image. It takes two arguments, the obsidian.Client and a plenary Path to the image file.

  @param client obsidian.Client
  @param path Path the absolute path to the image file
  @return string

Plugin default:

function(client, path)
  ---@type string
  local link_path
  local vault_relative_path = client:vault_relative_path(path)
  if vault_relative_path ~= nil then
    -- Use relative path if the image is saved in the vault dir.
    link_path = vault_relative_path
  else
    -- Otherwise use the absolute path.
    link_path = tostring(path)
  end
  local display_name = vim.fs.basename(link_path)
  return string.format("![%s](%s)", display_name, link_path)
end

Type: null or lua function string

Default: null

Declared by: