Skip to content

Pasting an image into a document generates wrong #image("image.png") location when used in a subfolder #147

@jakobhellermann

Description

@jakobhellermann

Description

When pasting an image from the clipboard into the web app, it generates the following typst code

#image("image.png")

and places the copied image.png at the root of the project.

If you are currently in a file inside a subfolder, say a/file.typst, this means that the image reference can't be resolved as the image doesn't exist next to the file.

I would expect one of the following to happen:

  1. The image gets referenced as #image("/image.png") (or perhaps #image("../../image.png"))
  2. The image gets saved inside the same subfolder as the file

It could also be configurable whether 1 or 2 happens, Obsidian provides this configuration option:
obsidian settings dropdown: location for new attachments

Metadata

Metadata

Assignees

Labels

bugSomething isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions