r/webdev • u/indicozy • 16d ago
Showoff Saturday imgtune: an open-source auditor that measures how much smaller your site's media can get
I've built an open-source auditor for media weight on websites.
It measures how much smaller your files can get (for example src/srcset, quality, format in your CDN or sharp) and tells you the exact best value to use. It checks quality for photos (SSIMULACRA2) and video (VMAF), flags GIFs that should be images or video, flags video autoplay, and covers fonts, compression and more. In short, it optimizes all your media. Once the audit is done, you can hand it to an AI model to apply the fixes.
I ran it on the homepages of 197 sites. The median page loads 630 KB more than it needs to, and across all of them 247 MB of media gets downloaded but never shown.
Try it: npx imgtune scan https://your-site.com GitHub: github.com/indicozy/imgtune Feedback and bug reports are very welcome š
16
u/BriefDiligent6542 16d ago
247 MB loaded and never shown. cool.
4
u/madhushankarox 15d ago
Thank you very much for the effort.
1
u/patryk_builds 15d ago
Haven't run it on my own site yet, so just reacting to the numbers.The totals and the median tell different stories. the four bars add up to about 526 MB of savings across 197 homepages, so roughly 2.7 MB per site on average, while the median is 630 KB. that gap means a handful of very heavy pages carry most of it. i'd show the distribution, or at least the top ten, because the typical site wastes 630 KB" and a few sites waste 30 MB each lead to different conclusions.Loaded but not shown is the finding i'd lead with. everyone knows to compress images. far fewer people realize they're downloading a video nobody ever sees.
Two questions:
- How does it decide something was never shown? a carousel slide or anything below the fold is hidden at load but visible ten seconds later. does it scroll and interact before calling it?
- The file:line in the report, does that work for server-rendered templates, or only when the markup is in the repo as written?
1
u/julianapereira2113 12d ago
For the AI handoff, does the audit emit structured findings (say JSON) with source locations and recommended values? That could make fixes less dependent on the model interpreting prose.
0
u/Extension-Fruit-4957 15d ago
Thanks. Is there an online version feely available?
-2
u/Standard_Scarcity_74 16d ago
Woah. Pretty handy for speedmaxing. Cool!!!