-
Notifications
You must be signed in to change notification settings - Fork 31
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 option to enable large SVGs #201
base: develop
Are you sure you want to change the base?
Conversation
@kirtangajjar thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirtangajjar Thanks for the PR. I tested and found the setting works incorrectly.
When "Allow large SVG files" is disabled, large files are actually uploading! I tested with this Phisical_Map_of_the_World_-_January_2015.svg (13.5 MB)
And, when "Allow large SVG files" is enabled, it throws an error and the upload fails with a note!
Can you please check what is causing this? you can use the same SVG I tested with
@faisal-alvi Thanks for the feedback appreciate it. Even I found that many time we can upload larger files without that flag, but for some files we just are not able to upload them without that flag. i.e. This portrait image won't work without that flag. I found this image in this issue discussion. Many big files would work without the flag. I wasn't able to find any image which causes issue with the toggle on so I kept it on. https://github.com/10up/safe-svg/assets/8456197/6805e259-26b5-45d1-af71-cbdc7135740c |
@kirtangajjar have tried with the https://commons.wikimedia.org/wiki/Category:Large_SVG_files#/media/File:Political_map_of_the_World_(January_2015).svg file? I can reproduce the issue with this SVG file. The issue (as mentioned above) is that I can NOT upload the SVG when "Allow large SVG files" is enabled !? but I can, when it is disabled! I'm ready to connect 1:1 to test and discuss this in detail. |
@faisal-alvi That's really weird. I downloaded the exact same Image and it was working fine for me. Let's connect on it on a week where I have some OSP time. |
Sure @kirtangajjar! Ping me once you are available for a call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirtangajjar we discussed over a call that you'll add a custom check to prevent SVG files larger than 10MB. The setAllowHugeFiles()
function produces inconsistent results, sometimes allowing files over 10MB when it shouldn't and vice versa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirtangajjar is this ready for review?
Description of the Change
PR adds support of large SVG files to the plugin. It also adds a setting for it to let the users toggle this behaviour.
How to test the Change
Verify GH action run on this PR and it works properly.
Changelog Entry
Closes #178
Credits
Props @kirtangajjar
Checklist: