Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Option to Remove Invisible Items #2043

Open
ViniciusFXavier opened this issue Jun 28, 2024 · 1 comment
Open

Feature Request: Add Option to Remove Invisible Items #2043

ViniciusFXavier opened this issue Jun 28, 2024 · 1 comment

Comments

@ViniciusFXavier
Copy link

Is your feature request related to a problem? Please describe.
Currently, there is no easy way to remove invisible items in SVGs using SVGO. This can be frustrating, especially when optimizing SVG files that contain elements with transparent color or rgba with alpha 0, which are not visible and only increase the file size unnecessarily.

Describe the solution you'd like
I would like an option added to SVGO to automatically remove invisible items, such as elements with transparent color or rgba with alpha 0. This would help further reduce the size of SVG files without losing any visible information.

Describe alternatives you've considered

  • Manually identifying and removing these elements, which can be time-consuming and error-prone.
  • Using custom scripts to clean these elements before passing through SVGO, but this adds an extra step to the optimization process.

Additional context
Adding a feature like this would significantly improve the workflow for developers and designers working with SVGs, making the SVGO tool even more efficient.

@SethFalco
Copy link
Member

SethFalco commented Jun 30, 2024

This makes sense, and can probably be added as part of removeHiddenElems.

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

No branches or pull requests

2 participants