Skip to content

Add an {image} role for inline images #2843

@choldgraf

Description

@choldgraf

MyST has a block-level {image} directive, which lets you control things like class, alt, width etc, and also lets you use inline attributes syntax like {image .my-class}. But there is no inline equivalent! This means that users who want non-basic functionality for in-line images don't have a way to do so.

We should enable authors to do things like:

This image {image alt="My alt" .inline-icon}`./image.png` is pretty neat!

We could essentially mimic the functionality of the {image} directive (maybe removing things like width/height and capping the height to 1.1rem or something.

Related

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