Skip to content

[Feature request] markdown-image use better syntax #445

@LincZero

Description

@LincZero

Clear and concise description of the problem

The default syntax of markdown img is to add additional data in the img url part in ![img title](img url)

This design, however, will result in a syntax that is not backward compatible with markdown syntax.

One example is that if I write ![test2](./img/does_not_compile.svg =200x) and view it on other md platforms, there is a high probability that the image will not be displayed.

(I have tested vuepress and typora, both of which do not have the imgSize feature enabled, and they only display ordinary text or incorrect images instead of the specified images)

Suggested solution

I can do PR if you agree to my plan.

The addition of additional information should be in the img title rather than the img url. This can achieve maximum downward compatibility.

A good example is the syntax in obsidian (built-in, not a plugin)

Image

I think this grammar can be added and suggest that it be recommended as the grammar in the document. (Old grammar can be retained.)
Meanwhile, this will also support users who create online documents from obsidian.

Alternative

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions