3 ms·
The section on images made me realize how redundant most blog post images are. Usually they are random generic images from Unsplash, Pexels, etc. and are only e
by keiferski 5y ago
The section on images made me realize how redundant most blog post images are. Usually they are random generic images from Unsplash, Pexels, etc. and are only exist to add some color to the page. The specific image is mostly unimportant.
Would it be possible to implement a browser-level image library? Instead of a blogger using a generic Unsplash image, they just select one from the "Firefox Image Library", which is already on the user's computer. This library can be curated and optimized to keep the browser file download manageable.
Considering that images are often 70-80% of the page size, the savings would be significant.
- pmlnr 5y agoIf you just want colour, why not add some clever, but simple SVG graphics?
- keiferski 5y agoDefinitely an option, but I don't know if most bloggers know the difference between vectors and rasters. I also think you would need to balance aesthetics and efficiency. No one will use the browser image library if all of the images are just simple graphics. You'd still want some shots of nature, cityscapes, etc.
- riidom 5y agoIf the image has indexed colours (which SVG's often have as well, unless you use gradients), using indexed .png's gives you huge savings. I have an image on my blog (1920x1080), which, as .jpg uses 272kb, but as indexed .png only 76kb, which is 27% the size. I'm using ~16 different colors, I believe. And the .jpg in this comparison is pretty hard compressed already (quality level 60 or 75, iirc). To generate this .png I use Krita, but PS should be able to do so as well. GIMP can do it too, but if you start with a 24bit graphics and need to reduce colors as first step, I got bad results with GIMP (may have been me, though). Krita did a better ootb-job for me here.
- aufhebung 5y agoHave fun explaining to everyone why their browser now takes up 20GB.
- keiferski 5y ago20GB would be 50,000+ properly compressed images. I don't think we need that many...a few thousand should be sufficient. That's only a gigabyte or less.
- makapuf 5y agoHaving properly cached links to a central repo of generic images would achieve almost the same without the download of many unused images on install
- hypertele-Xii 5y agoAnd in fact, there already exist websites that can serve generic images matched to keywords! Some of them even use neural networks to generate an image from a text description!
- prox 5y agoMost of the text on corporate pages are same-ish blahblah, we might as well add that to the Firefox Blurb Library :)
- wgx 5y agoI was able to squeeze some more optimisation out of it: For example: 600px-A20-OLinuXino-LIME2.png is 34,689 bytes as served by the site. Running it through PNGOUT, OxiPNG, AdvPNG and PNGCrush (all set to lossless) reduces the filesize by 6.8% down to 32,322 bytes with no visible diff to the image. I guess you'd need to weigh up the energy cost of compressing the image versus the cost of serving them all ~6% larger every time.
- notreallyserio 5y agoI remember back when many Medium articles I read were flooded with animated gifs for emphasis. What a mess.