Open EllyLoel opened 1 year ago
Nice catch! The custom emoji data is included in the status, so this definitely feels achievable.
{
"shortcode": "blobaww",
"url": "https://files.mastodon.social/custom_emojis/images/000/011/739/original/blobaww.png",
"static_url": "https://files.mastodon.social/custom_emojis/images/000/011/739/static/blobaww.png",
"visible_in_picker": true,
"category": "Blobs"
}
I'll need to see how the Mastodon UI decides the alt text. "blobaww" is somewhat descriptive but I have a feeling not all shortcodes are going to be suitable as alt text.
It seems they just use the shortcode as the alt text from what I can tell. I agree though, that's not always going to be super descriptive, tricky issue.
There is a Mastodon feature request asking for alt text for custom emojis but it's been around since 2018 and doesn't look like its a priority item in the backlog (https://github.com/mastodon/mastodon/issues/9269). If/when this gets implemented I would consider swapping custom emoji with images in the plugin so the post content can be rendered as is.
For now, I can include the custom emoji data for the status so that you have the shortcode and the static url. You would still need to map the shortcode to the image in your template file, but you would be able to provide more descriptive alt text.
Hey there, love the plugin, thanks for making it.
Currently custom emojis just show up as text e.g. :blob_cat_aww:
Would be great if the image url was returned or even better if the emoji shortcodes were transformed into
<img>
tags.