Skip to content

Use image alt text as a caption #4974

Closed as not planned
Closed as not planned
@eschalkargans

Description

@eschalkargans

Context

I was reading the documentation regarding images because I wanted to add captions to my images: Image captions (documentation)

In order to add a caption to an image, one has to use HTML.

Description

Use the Alt text of the image, already available in the markdown syntax, to generate automatically the caption.

A feature flag could be set up so that users can choose whether or not they want the caption to be displayed.

Here is a concrete example:

![My awesome image](../assets/images/awesome.png)

The image would be rendered, wrapped with a <figure> and a <figcaption>My awesome image </figcaption> describing it.

Related links

Use Cases

Use case from an author's perspective: It is a very common thing to want to name figures we use in a document

Use case from an user's perspective: An inserted image would be described once, without having to describe both an alt text and a caption (DRY)

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolved by config changeIssue can be mitigated by the reporter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions