[Bug] Infinite image optimization commits degrading .png quality
Describe the bug
Yesterday we started experiencing "infinite image optimization", where certain images never reach the stage where the bot stops committing and comments "x images did not require optimisation". Our build action does not get triggered from the bot commit, so this blocks our required merge check action using this library.
No matter what, our action implementing image-actions continues downgrading the quality for certain .png files, even when just rebasing or pushing up a trivial readme change, reaching the point eventually where the images become blurry.
Curious if others are experiencing this and if recent changes may have caused it.
How To Reproduce
One example image attached that continuously produces a bot commit from this library degrading the quality.
Here is example output from the calibreapp/image-actions bot commit, degrading the same image 3 times in inconsistent percentages. This is when adding 6 .pngs. 4 are getting infinitely optimized and 2 are not.
| 1.1 KB | 483 B | 57.1% |
|---|
| 483 B | 433 B | 10.4% |
|---|
| 433 B | 364 B | 15.9% |
|---|
Screenshots
Relevant Log Output
Code of Conduct
- [x] I agree to follow this project’s Code of Conduct
Thanks for reporting @bryangottschalk, could you confirm that you are using the latest version (1.4.1)?
This issue was reported in #349 following an update to sharp. I spent a few hours debugging and made some progress via changing compression settings, but it looks like it's still an issue (for PNG images in particular).
I think the next course of action might be to introduce a minimum required byte change (say 5kb?). Idea being that small compression increments like you've posted above wouldn't be accepted, committed or posted.
I can confirm the issue. I noticed the same behavior as @bryangottschalk with 1.4.1.
See for instance the 3 successive optimization pass required for the action to stabilize:
- https://github.com/kdeldycke/click-extra/pull/1342
- https://github.com/kdeldycke/click-extra/pull/1344
- https://github.com/kdeldycke/click-extra/pull/1346
Just commenting to let you know that we also add the issues on multiple repositories at http://github.com/GDevelopApp - we had to revert some commits because of images having artifacts. See an example here: https://github.com/GDevelopApp/GDevelop-documentation/pull/364
we are also facing the same, even when using main version
...
uses: calibreapp/image-actions@main
...