It might be worth adding a pre-commit check (or workflow?) to check that images are not larger than they need to be when added or changed.
Originally posted by @zware in #138842 (comment)
From some quick research, I see https://github.com/oxipng/oxipng may be a good option.
Linked PRs