Reddit's image hosting implemented blocking direct linking to image files and started substituting an HTML-ish page like imgur does a few months back. After much complaint they actually fixed it so that the image in the hijacked URL's HTML is a real image tag (<img src="ht..) with a real URL to the image file. For a while it had been a javascript defined custom html element (web components) instead of an <img>.
So at least they did that right. imgur has been failing hard at this for ~5+ years.
Their design is to control how the uploaded images are accessed and minimize the load on the backend.
They don't want hotlinking so the image data doesn't have a permanent url. They only want the backend to be responsible for sending image data. This then requires an image viewer written in javascript. This is not a bad design. This is fulfilling business requirements successfully and efficiently.
EDIT: efficient for the business not for your browser
It doesn't just require Javascript to load the image, it requires Javascript from 13 different domains (thanks, NoScript.)
- imgur.com
- btloader.com
- ccgateway.net
- cloudflare
- facebook
- google analytics
- media-lab.ai
- sascdn.com
- scorecardresearch
- stretchsquirrel
- amazon adsystem
- assembly exchange
- run.app
3 of these, imgur, cloudflare, and medialab appear to be the minimum to load the image, and also seems to make everything on the page work (upvoting, commenting, etc.)
I don't think it's efficiency even on their end they're looking for, its tracking and revenue maximization. Which is the reason I block Javascript.
EDIT: actually it seems like you just need imgur and medialab unblocked, so just 2 of the 13.
2. Because the number of people who disable JavaScript is a rounding error.