Skip to content

✨ Customize embeddedLink format for images #762

@patdski

Description

@patdski

Describe the solution you'd like
I would like to be able to generate captions for images in notes. The best solution I've found is a plug-in called Image Captions that uses the alt-text as a caption.

This works for short captions like "Player Map" but not for longer captions like "If you have Advantage, use the 18 If you have Disadvantage, use the 3". The reason seems to be the use of resource.shortTitle in alt-text when resource.title is longer than 50 characters, with resource.title placed after the text as rollover text.

I'm not sure why there is a 50 character limit, because a markdown link like ![If you have Advantage, use the 18 If you have Disadvantage, use the 3](place/holder/image.jpg) works just fine if manually entered in Obsidian. If it causes problems during the conversion process, I can understand that.

Another benefit of allowing customization is that rollover text is currently only available on longer image titles. Otherwise there is no rollover text at all.

Current link output:

Image

Result:

Image

Desired link output:

Image

Result:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions