calibreapp / image-actions

A Github Action that automatically compresses JPEGs, PNGs and WebPs in Pull Requests.
https://calibreapp.com/blog/compress-images-in-prs
GNU General Public License v3.0
1.42k stars 67 forks source link

[Bug] WebP optimization requires successive passes to optimize #164

Closed mastercoms closed 1 year ago

mastercoms commented 1 year ago

Describe the bug

Hi, I'm receiving successive PRs to optimize webp images that each reduce the file size. Can this be done in one pass instead?

Occurrence 1:

https://github.com/mastercomfig/hud-db/pull/7 https://github.com/mastercomfig/hud-db/pull/8 https://github.com/mastercomfig/hud-db/pull/9

Occurrence 2:

https://github.com/mastercomfig/hud-db/pull/11 https://github.com/mastercomfig/hud-db/pull/12 https://github.com/mastercomfig/hud-db/pull/13 https://github.com/mastercomfig/hud-db/pull/14

How To Reproduce

No response

Screenshots

No response

Relevant Log Output

No response

Code of Conduct

benschwarz commented 1 year ago

cwebp has a --passes argument, but that doesn't appear to be translated into Sharp's documentation. At the moment, I think the answer is no.