FixTweet icon indicating copy to clipboard operation
FixTweet copied to clipboard

Use multiple og:image meta tags for Discord embeds

Open katlyn opened this issue 1 year ago • 8 comments

Discord has recently started using their own media mosaic on embeds for pages that have multiple og:image meta tags. This is more user friendly and has a better user experience than generating one image with all images from a post edited together. Notably, Discord's embed debugger does not yet support multiple images, but within the client itself this works on both web/desktop and android. As iOS seems to not support the mosaic in embeds at the moment, this could be put behind a flag for now rather than being the default for Discord.

As an example of multiple og:images being embedded from metadata, you can take a look at https://mastodon.is-hardly.online/@katlyn/111459081527802270 (screenshot in Discord below). image

katlyn avatar Jan 19 '24 19:01 katlyn

This is really good to know actually because for the longest time this never worked before. That's weird that it doesn't work on iOS yet if it works on Android. It might become supported very soon though. Once it's supported on iOS I will enable native multi-image! I'll keep a close eye on this.

dangeredwolf avatar Jan 19 '24 19:01 dangeredwolf

It's unfortunately been unsupported on iOS for the longest time for whatever reason - back when Discord was able to embed multiple images for twitter natively it still worked on desktop and android but not iOS. Bots have also been able to put multiple images in embeds as well for at least a few years at this point, but iOS only displays the first image. No clue why iOS still doesn't support it but it is a rather unfortunate lapse in feature parity.

katlyn avatar Jan 19 '24 19:01 katlyn

Huh. That's weird because the new Discord Android app is based on the same code base as the iOS one.

dangeredwolf avatar Jan 19 '24 19:01 dangeredwolf

The native Twitter embeds on Discord are special anyway because they use webhook embeds which are richer than normal website embeds. We can't use all of its features from within webpages unfortunately, that's why fxtwitter doesn't have a date and time on tweets.

dangeredwolf avatar Jan 19 '24 20:01 dangeredwolf

I could at least create a flag to enable native multi-image for those who would prefer it. I really want to see Discord fix this on mobile before we make this experience the default

dangeredwolf avatar Jan 21 '24 18:01 dangeredwolf

On second thought, I think using the native multi-image by default is better, so that will eventually be the new default. Right now I have it implemented as an experiment just to see how it goes, but if it goes well I might turn it on by default. Instead, you will be able to manually opt-in to keep using image mosaic (m.fxtwitter.com). I'm curious what other peoples thoughts are because I've gone back and forth on this because it's just generally a much better experience on desktop but means not being able to view multiple images on iOS

dangeredwolf avatar Jan 22 '24 07:01 dangeredwolf

My personal preference would be that native multi-image be the default, but I also don't use iOS regularly at all - part of me says that it's for the better because android + desktop do make up a significant portion of the user base but at the same time it would be a significant feature reduction for iOS users.

katlyn avatar Jan 22 '24 19:01 katlyn

I ended up turning off the experiment for now because people that used iOS obviously didn't like it, but I would like to at least enable native multi-image as a flag, so I'll probably do that soon

dangeredwolf avatar Jan 22 '24 20:01 dangeredwolf

I ended up doing the inverse, m.fxtwitter.com/m.fixupx.com will use native multi-image. I might invert it back if Discord fixes the mobile bugs, but at least this will give people an option for native multi-image if they want 👍

dangeredwolf avatar Mar 01 '24 20:03 dangeredwolf

I know it's closed but anybody has an idea to force Discord to choose one og:image? Mine had 3 and it's now 4...

lpbellier avatar Jun 17 '24 20:06 lpbellier

@lpbellier By default it'll create a mosaic of all the images. m.fxtwitter.com should display each image separately on desktop discord clients. If it's not appearing correctly or showing duplicate images please send an example URL and I'll check it out!

dangeredwolf avatar Jun 19 '24 04:06 dangeredwolf