Scaling Twitter videos/gifs

I’ve got a CSS question for Stylus.

Is there a way to scale videos/gifs in Twitter feeds? Because BazQux over-scales and bloats videos or gifs to the full frame even though they’re small in dimension originally. Also without the images width set on “full” in appearance settings they’re shown beyond the max dimension of the media file.

You could limit width of videos with something like

.iframeScaler { max-width: 500px !important }

but it will limit size of all videos (YouTube, Vimeo, Facebook, etc.) not only Twitter ones.

In general videos are quite often smaller than the width of the text so they’re scaled for more comfortable view. Could you provide a sample feed with small gifs so I could check how it looks?

I actually don’t mind getting the other videos smaller as well. I prefer a compact timeline anyway that you can easily scroll through, and whenever something catches my interest, I open it in a new tab.

But these are for example Twitter accounts that post low res videos or gifs regularly if I’m not mistaken:
https://twitter.com/SatisfyingDaily
https://twitter.com/AwardsDarwin

Then limiting the size of all videos could be the best option in your case. Besides custom CSS you could also try to reduce “Text width” setting. It will reduce width of videos as well (they have the same width as text).

Some videos in these Twitter accounts have very small original size and it will be inconvenient to show them in original size. Twitter itself scales them up (although Twitter has quite narrow timeline, which could be imitated by setting low “Text width”).

Yeah, I already considered the “text width” setting, but I don’t really like how it narrows down the interface overall. I’m totally fine with limiting the size of all videos.

To me personally, the perfect experience lies somewhere between the compactness of Twitter’s interface and the functionality of Bazqux. So by adjusting it with Stylus I can come really close to it.