Ask HN:大家还关心图片优化吗?
2 分•作者: CM30•19 天前
或许我有点老了,但我记得以前的说法是,应该根据图片的类型选择合适的格式来保存,以减小文件大小。比如,照片用 JPEG,插画和图标用 PNG,矢量图用 SVG,等等。
但现在感觉没人这么做了。我看到的每个网站似乎都只用 WebP 格式存储所有图片,而且很多网站直接上传数兆字节的 PNG 照片文件。似乎也没有太多人在意上传的图片尺寸是否匹配最大设备的尺寸需求,即使是 Discord 这样的网站上的小 GIF 图,也常常是几十兆字节大小的全尺寸图片。
那么,互联网是突然决定不再关心带宽和图片大小了吗?大家是不是都接受了所有图片都上传到那三个相同的服务之一,并且现在每个人都有高速互联网连接了?
在 90 年代到 2010 年代关于性能的各种讨论之后,现在这样感觉很奇怪。
查看原文
Maybe I'm showing my age a bit, but I recall hearing that images should be saved in formats based on their type to save on file size. So, photographs would be JPEGs, illustrations and icons would be PNGs, vector images would be SVGs, etc.<p>But now it feels like no-one does this anymore. Every site I've seen just seems to store all images as webp now, with many outright uploading multiple megabyte photo files in PNG format. There also doesn't seem to be a lot of care put into uploading images that match the dimensions needed for the largest device either, with even tiny GIFs on sites like Discord often being full-sized images dozens of megabytes in size.<p>So, did the internet just decide that bandwidth and image sizes aren't a concern anymore? Did everyone just accept that every image is posted to one of the same 3 services and that everyone has a high-speed internet connection now?<p>It just feels weird after all the talk of performance in the 90s-2010s.