According to DEV Community, a new post by Appie.run builds an image auditor in Python using only the standard library. It reads a sitemap or sitemap index, fetches each page and collects every img tag. Each unique image is checked once. The output is a CSV with one row per image per page, a console summary of the heaviest pages, and an exit code for use in CI.
File size comes from a HEAD request's Content-Length, with a full download as a fallback when the server refuses HEAD or sends no length. Pixel size is read from the first 64 KB of PNG, GIF, JPEG and WebP files. The script then flags images that are heavy, have pixel width well above the declared width, lack width and height attributes, or use loading="lazy" in the wrong place. It treats the first two images in the HTML as probably above the fold.
The author tested it on a local fixture shop site with planted problems. All of them were caught, including an 11.3 MB PNG shown in a 600 pixel slot and a lazy-loaded hero image. After fixes, total image bytes fell from 15,912 KB to 1,821 KB, and the heaviest page dropped from 12,145.5 KB to 657.8 KB.
The post is open about its limits. It sees only server-returned HTML, so images added by JavaScript and CSS backgrounds are missed. Class-based CSS aspect-ratio rules are not detected either. The 200 KB default is the author's own line, not a Google or Lighthouse figure, and can be changed. The post also discloses that Appie.run published it and mentions two of its own free sitemap tools.
Why it matters
Image problems build up one upload at a time. The article cites guidance from web.dev, Chrome for Developers and Google Search Central: size images to how they are displayed, set width and height to avoid layout shifts, and do not lazy-load images that appear on first view, especially the main one. Each rule is simple, but nobody checks them across hundreds of pages by hand.
A sitemap-wide report shows which pages and which shared template images cost the most. The author notes that a shared hero or badge appears on every page, so one fix clears many rows. Treat the script's flags as prompts for a human to review, since it cannot render the page or see every CSS rule.
Source: DEV Community. This brief summarises their reporting; read the original for the full detail.