Indeed, I thought reddit self-hosting images would be its death for this reason: it's just a moneysink. But it seems to be going well.
Perhaps the rest of the site's traffic is subsidizing what they spend on the image hosting? Or maybe bandwidth and storage costs are finally lower than how much each image costs, given that our eyes haven't gotten any better and so a certain size jpeg is simply good enough?
Before you reply that you technically still can use Imgur, that's also still the case for Imageshack - but you cannot rely on them any more, unless you are a paid user.
Thanks for this. I just threw your comment on Llama and asked for a userscript that would also be compatible with old reddit. It gave me this https://pastebin.com/0d7mhcBu and it's been working fine. I can now middle/right click an image and open it fully in a new tab instead of that new webpage.
Though, given that I think the solution to this can be generalized, I think it is about time someone made a more general extension that can apply this across a wide variety of sites that misuse the `Accept` header for unwanted behavior.
(Also, since mangling the Accept header is the best way to avoid unwanted WebP/AVIF/HEIC transcodes without fully disabling support for these better image formats, it'd be nice if that was also rolled into such an extension.)
Shame that the extension doesn't seem to be compatible with Firefox on Android, since Reddit's mobile site is borderline unusable for displaying images, doubly so if you want to zoom/scroll them.
This suggests it only works in Nightly, but it also works in Fennec F-Droid, so frankly you should consider switching to that if you can. (I wish Fennec F-Droid could just allow arbitrary extensions and extension side-loading, but I guess it would be non-trivial. Thanks Mozilla!)
Yes, this is exactly what Imgur and Reddit are doing. They're serving you an HTML page that requires JavaScript, riddled with ads, when you intended to link to an image file. This happens because when the user agent navigates to a URL, it prefers text/html over other formats, so it's possible to distinguish it from an <img> fetch. This is a feature, but I do take the stance that it is a misuse of the feature as it is done on Reddit and Imgur, just the same as how abusing the window.open API for popup ads was (and how, in that era, it was relatively promptly taken care of by user agents, back when the word "user" in user agent meant anything.)
I didn't at any point call serving formats I "don't prefer" (I do prefer AVIF) "abuse" of the Accept header. I just don't want images that were JPEGs to be transcoded to even lossier WebP/AVIF/HEIC files when I browse to them. Sure, if it's part of the page layout it's not a big deal, but when I'm viewing the original size image, it should be, ideally, the original image. I don't actually care if the image is WebP/AVIF/HEIC natively, that is not a problem.
This won't work if implemented browser-wide as malicious website will just adjust the URLs for their images to compensate. In general, URL file extension snooping only causes more problems than it solves.
Maybe. It seems sensible to me that if the UA is requesting a path that ends in .jpg (for instance), they're expecting a JPEG and the UA should accept image/jpeg. At least if this escalates the arms race, user-hostile websites won't commit this specific crime, instead they'll serve content that better matches the URL.
> This happens because when the user agent navigates to a URL, it prefers text/html over other formats, so it's possible to distinguish it from an <img> fetch. This is a feature
Is it though? What non user-hostile things does it enable?
I think you're thinking about this slightly backwards. What else would you expect the browser to do, given a URL and no other context? Would it not ... prefer text/html? It's a hypertext browser, it prefers hypertext.
For many, many years, content negotiation was not adversarial, and there was little reason to believe it ever would be. Until it was, of course.
So how do we fix it, telling every page view we'd prefer if it were a JPEG? Probably not. Of course, you could make "Open Image in New Tab" do some magic to ensure that it acts like an image fetch: that sounds like a good idea.
> What non user-hostile things does it enable?
Content negotiation in general is pretty good. In theory, it lets a web server pick the best possible format that is supported by your client. For example, it would be possible for the server to transparently serve you a JPEG XL-compressed JPEG if your browser supports it, or fall back to the original (identical but larger) JPEG image if it does not.
Is there a good reason to prefer text/html? I know this will be unpopular but I believe that "upgrading" GIF links to WebMs in <video> tags is not user hostile in and of itself. GIF89a is a pretty antiquated format and LZW compression of 8bpc frame deltas is not exactly state of the art anymore; the difference between a GIF and a WebM of the same thing is usually multiple megabytes of bandwidth, and that can be extremely annoying, especially on mobile clients. Of course if you make it hard to access the original file, this will reasonably irritate people, but I think broadly the idea behind it is reasonable.
Being able to distinguish a navigation fetch from an <img> fetch is actually good because it would let the server behave in a more user-friendly fashion on the navigation fetch, for example by serving only formats that would be most likely to be useful to the user. Unfortunately, we can't have nice things, so it seems like some day content negotiation will have to be partly gimped.
I honestly did assume it was a sincere question, but I will admit I was rubbed a bit the wrong way about "serving formats you don't prefer" because I was trying to word my original comment carefully enough to avoid that implication.
Internet commenting has definitely taught me many times that it is actually really hard to convey what you're thinking accurately.
For iOS you can most likely just get something working with Redirect Web, which from my understanding this app is effectively doing the same thing of redirecting links.
Just a quick heads up. I missed some DMs on Reddit because I have a FF extension to automatically redirect me to old.reddit.com because the notification indicator at the top wasn't lit.
There's also alternative frontends like Rimgo : https://codeberg.org/rimgo/rimgo Then you can use LibRedirect to redirect all imgur urls to a more friendly frontend. (Now there's the issue of imgur aggressive block of datacenter/vpn IPs but it's another story)
IMO we shouldn't rely on TIA to deliver content because the original source is really bad. They have limited resources and are already being abused by lazy devs, moreover the picture you will get might have been modified to be something else on the archive.
The user you’re replying to asked how to solve a practical problem and you responded with philosophy.
While I don’t disagree with what you said in principle, being able to fall-back to TIA for removed/deleted images would probably solve the issue 95% of the time.
Are we talking about removed/deleted images? My impression was that the suggestion was to use TIA to circumvent imgur's rate limit. Which is an application I find very questionable.
> The user you’re replying to asked how to solve a practical problem and you responded with philosophy.
If you never apply your morals you may as well not have them. Not to mention that overusing a free resource might cause it to be restricted in the future
Last I checked, HN isn’t OPs personal army, as it were.
I’m sure that the replier is aware of what was being asked, and what they were responding with. To suggest otherwise is condescending.
This is a social network. This sort of conversion is not just allowed, but encouraged. Perhaps you’d feel more at home on a Stack Exchange website, where like-minded individuals will stand alongside you in enforcing a strict Q&A format, even when it doesn’t make sense to.
I love this idea for an extension and have wanted something to do exactly this, but it doesn’t seem to work for me. I checked the enablement and the permissions, but the imgur test image link still loads the full page.
Are you able to use imagus on the phone? I love imagus too, but the images in this app seem to convey that this is meant for opening imgur links on mobile.
It's a shame that we are getting to a place to have an extension for each site to avoid dark patterns. May be just all in one extension just like Greasemonkey.
We should just have custom clients for every website. Just simple HTTP clients that talk to the remote servers directly and pulls and displays the data we want.
Dark patterns like trying to make money? Most people seem to agree that hotlinking is bad, but that's pretty much was imgur has exclusively been used for since its inception.
I disagree a lot with both the things you said. What arguments are there in favor of stealing bandwidth?
I think you're right that initially Imgur was happy to host images for reddit if it drove traffic to their homepage. They don't then "owe" their users who have paid a total of $0 to keep doing that forever if it stops being profitable to them.
it's arguably harder to make an extension system when you can't write your own broswer and you'd have no way to distribute them either because the platform dictator doesn't allow it