This RFC proposes the addition of a spoiler attribute to the <img> tag. This attribute will allow images to be marked as spoilers on platforms that support this feature.
Support platfrom
Telegram
Discord
Kook (?)
The status of this feature on Kook is currently uncertain due to discrepancies between the platform’s documentation and its actual API.
The above platforms all support <spl> tag, but this is only for text.
Introduction
The spoiler attribute is intended to enhance user experience by allowing sensitive content to be hidden until the user chooses to view it. This is particularly useful in chat applications where users may wish to discuss sensitive topics without spoiling the experience for others. (e.g. R-18 picture and more)
Proposal
We propose the add attribute to the tag:
<img spoiler="true" url=""></img>
In this example, the spoiler attribute is set to true, indicating that the image should be treated as a spoiler. If the spoiler attribute is not present, or if its value is false, the image should not be treated as a spoiler.
Compatibility
This feature is compatible with platforms that support spoiler tags for images, on platforms that do not support spoiler tags for images, the spoiler attribute should be ignored, and the image should be displayed as normal.
Abstract
This RFC proposes the addition of a
spoiler
attribute to the<img>
tag. This attribute will allow images to be marked as spoilers on platforms that support this feature.Support platfrom
Introduction
The
spoiler
attribute is intended to enhance user experience by allowing sensitive content to be hidden until the user chooses to view it. This is particularly useful in chat applications where users may wish to discuss sensitive topics without spoiling the experience for others. (e.g. R-18 picture and more)Proposal
We propose the add attribute to the tag:
In this example, the
spoiler
attribute is set totrue
, indicating that the image should be treated as a spoiler. If thespoiler
attribute is not present, or if its value isfalse
, the image should not be treated as a spoiler.Compatibility
This feature is compatible with platforms that support spoiler tags for images, on platforms that do not support spoiler tags for images, the spoiler attribute should be ignored, and the image should be displayed as normal.
Implementation
Telegrame
See API Documentation
Add
has_spoiler
in the request bodyDiscord
Add
SPOILER_
to the start of the image nameKook
don't know