3 ms·
Sorry, a little off topic gripe about the article itself. I have gigabit internet and still noticed the two images for this article loading line by line, top to
by _cxgq 5y ago
Sorry, a little off topic gripe about the article itself. I have gigabit internet and still noticed the two images for this article loading line by line, top to bottom. Upon inspection I see they are using massive (5.67mb & 3.6mb) .png images with a resolution of 2832x1838. However, the maximum size they are ever displayed is 836x546.
It took me less than 1 minute to do a quick and dirty optimization bringing them down to less than 100kb each. Here you go author:
https://i.imgur.com/WGk8dBS.jpg https://i.imgur.com/WGk8dBS.jpg
https://i.imgur.com/pHSFsCb.jpg https://i.imgur.com/pHSFsCb.jpg
- spaceribs 5y agoThank you, I did this blog post rather quickly :( Edit: updated the images, thanks again
- _cxgq 5y agoYou're welcome, have a great day friend.
- m_a_g 5y agoI love the HN community.
- Waterluvian 5y agoIdea: a simple service that takes a URL and discovers stuff like this and spits out optimizations.
- mhh__ 5y agoBeing in a forum with people in the middle of nowhere can serve as a very immediate "service" e.g. - hey guys look at my blog post - I'm in [a village in Tibet or whatever] and it's still loading after 30 seconds...
- capableweb 5y agoSolution: This already exists, Google Lighthouse is one (https://developers.google.com/web/tools/lighthouse https://developers.google.com/web/tools/lighthouse) but many non-Google alternatives exists too (https://alternativeto.net/software/google-lighthouse/ https://alternativeto.net/software/google-lighthouse/)
- wongarsu 5y agoSo Google's Lighthouse? Or more on-the-fly fixes by the webserver like mod_pagespeed?
- eterm 5y agoPretty sure Yahoo and google both had a service that did that a decade or more ago.
- jacobobryant 5y agoShoutout to https://images.weserv.nl/ https://images.weserv.nl/. e.g. given https://example.com/foo.jpg https://example.com/foo.jpg, you can do <img src="https://images.weserv.nl/?w=100&url=https://example.com/foo.jpg https://images.weserv.nl/?w=100&url=https://example.com/foo....">
- schleck8 5y agoCould also opt for Webp instead, that can save an additional 50 % at indistinguishable quality when zooming fully in
- account42 5y ago> indistinguishable quality Definitely not indistinguishable at the default settings of all the webp encoders I have tried.
- schleck8 5y agoNot sure which ones you used but pillow handled it flawlessly, and as I said, i zoomed fully in with a comparison program and there was barely any difference even at 80 percent quality while using up to 80 percent less space