Image quality is worse than tweet's full picture
It might be a limitation of your server/service, but the embed currently divide roughly by two the pixel count of images.
is this intended ?
Hi, we normally embed the raw image files from X/Twitter/Bluesky, so this shouldn't happen. What platform are you using? Discord? Do you have an example post where this occurs?
I foudn a tweet where it does that, but i noticed that the embed itself redirect to the proper size, but if i click on the image to open it in "big" with discord's new image viewer, this one redirect to a images-ext-1.discordapp.net link which is a webp instead of jpg and it has a smaller size
tweet that does it : https://x.com/hsrmangakichi/status/1902996755257446821/
link when i don't open in "big" and right click "open link" : https://pbs.twimg.com/media/GmjNdbcakAAukds.jpg
link when i do open in big then "open link" : https://images-ext-1.discordapp.net/external/cIug7WIdKZEuKDYvrigQl93hRoZCqzYbE01cipoWXH0/https/pbs.twimg.com/media/GmjNdbcakAAukds.jpg?format=webp&width=683&height=968
clearly the issue is the ?format=webp&width=683&height=968 at the end of the link but i don't know if it's fx or discord that does that
That's Discord's image proxy adding that, not us, so not sure how much we can fix this...
well that's a shame then
discord whyyyyyy
as a side note, the Phixiv "re-embeder" that i also use daily has the very same issue.
so this clearly was added by discord in their recent UI update (which for once isn't disgusting), but sadly it might mean that it's not fixable, which is quite a shame
Yeah unfortunate, if I find some kind of workaround I'll let you know
On mobile, when images are opened (i.e. you tap on them to open them in full screen), I believe they open the "source image" (idk if there are other prerequisites to this like using Wi-Fi instead of mobile data), so they don't get sized down.
When you click "Open in Browser", the image source is from https://pbs.twimg.com/media/[id].jpg (as @OshidaBCF mentioned), whereas on the Twitter website it uses https://pbs.twimg.com/media/[id]?format=jpg&name=large; I think the added parameters of ?format=jpg&name=large is why you'd see a higher quality image on the Twitter website. Maybe instead of .jpg it could be ?format=jpg&name=large? (or even better, ?format=png&name=large since it provides a lossless copy of the originally uploaded image)
Examples: Original Twitter link: https://fxtwitter.com/honkaistarrail/status/1940576223446372849 Discord sources from https://pbs.twimg.com/media/Guyf1M9W8AAaz9l.jpg Which is lower quality than https://pbs.twimg.com/media/Guyf1M9W8AAaz9l?format=jpg&name=large But best quality is from https://pbs.twimg.com/media/Guyf1M9W8AAaz9l?format=png&name=large (see how there's way less of the signature .jpg compression artifacts)
Even if Discord still passes all of its images through their own image proxy on other platforms, giving Discord the highest quality image to proxy will still provide better image quality in the end (less generational quality loss), so I'm still in favor of changing the image sources to have ?format=png&name=large.
Whoops I just realized what i said was a duplicate of https://github.com/FxEmbed/FxEmbed/issues/1282 🥀