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

Add options to disable SVG optimizer and sanitizer #138

Open
1 task done
EldarAgalarov opened this issue Jul 24, 2023 · 2 comments
Open
1 task done

Add options to disable SVG optimizer and sanitizer #138

EldarAgalarov opened this issue Jul 24, 2023 · 2 comments
Labels
type:enhancement New feature or request.

Comments

@EldarAgalarov
Copy link

Is your enhancement related to a problem? Please describe.

Hi. It would be nice to add an option that completely disables the SVG sanitizer when uploading SVG files. Many users, would not want their SVG files to be modified.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@EldarAgalarov EldarAgalarov added the type:enhancement New feature or request. label Jul 24, 2023
@jeffpaul
Copy link
Member

@EldarAgalarov that, in general, sounds like a wildly unsafe and potentially insecure approach. As such, I'm not certain that's a scenario that we honestly want to support. That said, I'll leave this issue open to capture any additional community input before determining how best to react to this idea.

@jeffpaul jeffpaul added this to the Future Release milestone Aug 16, 2023
@EldarAgalarov
Copy link
Author

EldarAgalarov commented Aug 20, 2023

@jeffpaul

There are risks that such optimizers and sanitizers may break SVG files by adding some visible artifacts.

Many users just want SVG support only without optimizers/sanitizers, i.e. the ability to upload SVG's to the WP media library and be able to display them correctly in Media and in WP posts and pages. Without any forced optimizations and sanitizations.

You can add options that will disable these optimizers/sanitizers for advanced users only by implementing them through WP filters. So by default optimizer and sanitizer will be enabled but if user wants to disable them then he can do it at his own risk.

@EldarAgalarov EldarAgalarov changed the title Add option to disable SVG sanitizer Add options to disable SVG optimizer and sanitizer Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants