For example: This topic has a oneboxed link with a 1408x528 pixel 640kb image, which is way more than is needed for the 129x48 pixel thumbnail that is shown, even accounting for a 2X or 3X pixel density.
Can oneboxing process the image to shrink it to a more reasonable size? The image is stored locally, so it should be possible.
But what if you prefer a differently formatted one-box with a larger image? I could see that happening at some point.
Also, I would be a bit nervous about a change in behaviour here ā¦ the popular Topic List Previews plugin uses these images to create large previews on the Topic List (just as Facebook (and Fakebook!) does). They would look pretty awful at significantly lower resolution. Weād at least need a way to recall the original, generously proportioned, open graph image url on a rebake.
(btw, as aside checkout my How To which is rather pertinent given the Forum you link:
Looking more closely, this is an animated GIF so that is kinda expected here. I donāt think your request makes a lot of sense without the additional context. This isnāt just an āimageā, itās a small movie.
The format of the image doesnāt matter, this is just the first example I found. Hereās an example with a JPG: it has a 744kb 1080p image which it shows in a 60x60px thumbnail.
What I expected is that it gets resized, like an attachment would be, perhaps to a height of 180px (for 3X pixel density displays). When I do that manually it drops to 31kb, 4% of the original file size!
@merefield raises an interesting point about Topic List Previews and Fakebook. Still, I think the default behaviour should be to resize them.
I am guessing you didnāt set up Twitter API for twitter login? Thatās required to get proper Twitter oneboxing in my experience, even if you donāt plan to let users use their Twitter accounts to log in, although that is a nice benefit.
It really doesnāt matter if the image is 500k in todayās world, to be honest. And with retina devices being so common, you want a 2x sized image anyhow in most cases.
Right but this is a bit of a micro-optimization at the current time. And honestly if the source is doing something inappropriate, the source should fix itself for the betterment of the whole web.
Right, Discourse doesnāt guess which image to use, it takes what the og:image meta property says to use. So it is up to the source to be telling us to onebox a sensible image. Okay, thanks for helping me understand more.