Twitter embeds now support images


#1

Continuing the discussion from Generic 2016 US Election Cycle Recycling Bin

is there a way for Discourse to display images embedded in tweets rather than just the text?

Wherein I said

Nope, because that makes the embed variable height which screws up scrolling. We can only do fixed height embeds.

@eviltrout had some time and found we do actually get the exact image underlying dimensions back from Twitter, which is the requirement for this to work:

So pip pip and cheerio to @eviltrout for making the :sparkles: happen here!


#2

Is it applied retroactively, or does it only work from here on out?

(Gah, I know I should read the documentation/release notes, but I’m out of the habit, due to there being practically no documentation at work. It’s a shitshow that seems to train you to have all the worst habits in IT.)


#3

We’d need to rebake the relevant posts. It is possible to globally rebake, or conditionally rebake posts with only twitter.com, but it will work for all new posts already.


#4

Cool, thanks.

I guess when you do your next global rebake for other features on the site, this would be applied too? Didn’t you do a global rebake sometime a year or two ago?


#5

I seem to get the size of the pictures marked out, but not the picture itself…(on chrome)

Likely to be down to something being blocked by Disconnect or uBlock Origin?
(looks okay in Safari)

  • if it’s something being blocked, I’m not sure what, because I can display the pbs.twimg.com image fine on its own.


#6

cool!


#7