Hacker News new | comments | show | ask | jobs | submit login

I get why this is done, and it is important. But look at the amount of effort and time that goes into displaying a single image properly on the web nowadays. It's just nuts.

It feels like we are slaves to the tech and not the other way around.




You should read up on Client Hints. Allows the browser to automatically send desired size and pixel density down the image request, where the CDN can then serve up the appropriate file. Basically means for most cases you could go back to using a single <img> tag.

It's Chrome only for now but it's a nice future.


If you are using images from a vector source, SVG is supported by all modern browsers and naturally provides all this for free. However for smaller resolutions, PNG may result in a lower file size.


I feel like this is just performance tuning. Serving a single image is fine for most cases and it's not harder than it used to be. If you want a huge image for hi-res desktops and a smaller one for phones, you only need one of those CSS tricks (the "srcset" one).


You can always outsource the work to a service like WebFlow or Cloudinary to lessen the workload.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: