I’ve seen a lot of wishes in various comments and feature requests for Lemmy to support image galleries (e.g. similar to Reddit posts with multiple images you can swipe through).
My first thought was to just detect multiple images in the post body and render those (plus the thumbnail) as a gallery instead of just the thumbnail image. That’s absolutely doable, but perhaps there’s a better way?
My second thought, which is what I now prefer, was to make a custom markdown container for an image gallery (the same way the spoiler tag is implemented).
e.g.
:::gallery Gallery Title
![Image 1 Alt Text](https://example.com/image1.jpg "Caption for Image 1")
![Image 2 Alt Text](https://example.com/image2.jpg "Caption for Image 2")
![Image 3 Alt Text](https://example.com/image3.jpg "Caption for Image 3")
:::
It would then render that as an image gallery that can be swiped through.
Pros
- Easy to implement in most markdown libraries that support custom containers (
markdown-it
,marked-js
, etc) - Easy syntax for users
- Allows explicitly creating a gallery instead of relying on implicit behavior (e.g. detecting / rendering multiple post body images as a gallery)
Cons
- The custom markdown container would need to be implemented by clients (preferably more than just one or two)
- It wouldn’t work in Lemmy-UI (hey, they should have to adopt one of our features for a change)
- The “title” component of the markdown image syntax would be interpreted by some clients as the code for a custom emoji, so that may need to be omitted if we want this to fail mostly-gracefully in less capable apps (cough Lemmy UI cough).
Thoughts? Other suggestions?
I know, I agree, but I don’t really blame them. Either we need to find a way to support them with more resources so that they can increase their output, or we need to take it upon ourselves to make the changes that we would like.
I know and it was clear from the beginning. I am just really tired of dealing with different clients and different accounts to participate in the Fediverse, and I really want to see more clients implementing the C2S side of ActivityPub…