Skip to content

Conversation

@viralcodex
Copy link
Contributor

@viralcodex viralcodex commented Oct 22, 2025

FIXES: #2050
Introduces the --hide-unchanged CLI option to suppress output for SVG files that remain unchanged after optimization. Includes tests to verify that only optimized files are shown when the option is enabled.

Console Outputs:

coa % npx svgo --folder testFolderUnchangedSvg -h --output temp/
Processing directory 'testFolderUnchangedSvg':


optimizable.svg:
Done in 5 ms!
0.268 KiB - 61.3% = 0.104 KiB

----------------------------------------

coa % npx svgo --folder testFolderUnchangedSvg --output temp/ 
Processing directory 'testFolderUnchangedSvg':


optimizable.svg:
Done in 4 ms!
0.268 KiB - 61.3% = 0.104 KiB

unchanged.svg:
Done in 0 ms!
0.104 KiB - 0% = 0.104 KiB

Introduces the --hide-unchanged CLI option to suppress output for SVG files that remain unchanged after optimization. Includes tests to verify that only optimized files are shown when the option is enabled.
@viralcodex
Copy link
Contributor Author

Hi @SethFalco,
I have implemented the requested enhancement in the PR, please have a look and let me know at your convenience.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST]: Option to hide SVGs that were optimised by 0%

1 participant