You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After further testing I found that forcing resource_type=raw caused SVGs not to render inline in WordPress/Elementor (URLs like /raw/upload/.../icon.svg would not display in <img> tags).
The proper delivery path is via image/upload with f_svg,fl_sanitize and a .svg extension.
This way the browser/WordPress Media Library/Elementor all render the SVG correctly, while PNG-conversion is prevented.
Hi @TheRealFreelancer, thanks for opening this bug and providing a mu-plugin.
I was also able to reproduce the issue on my side and I have reached out to the team to look at your solution.
We'll keep you posted on this!
Hi @Vdeub-cloudinary, thank you for reaching out to the team. I'm glad you could reproduce the bug. Were you be able to also (temporarily) patch it with the mu-plugin? Regards
After modifying class-svg.php with your fix, I can confirm that it resolves the issue. Much appreciated.
Behavior:
SVG Support Off: Import SVG -> Converts to PNG
SVG Support On: Import SVG -> Remains in SVG format
Just a note: Turning off SVG Support after importing an SVG renders the imported file unusable (in a "Cloudinary Only" storage scenario). I'm not sure if this is intentional, but if someone deletes the "deactivated" SVG file, it removes the main file in Cloudinary. This could be a bit confusing. Maybe the user experience could be improved with that.
Activity
TheRealFreelancer commentedon Aug 26, 2025
Update: Working MU-Plugin Fix (v2)
After further testing I found that forcing
resource_type=rawcaused SVGs not to render inline in WordPress/Elementor (URLs like/raw/upload/.../icon.svgwould not display in<img>tags).The proper delivery path is via
image/uploadwithf_svg,fl_sanitizeand a.svgextension.This way the browser/WordPress Media Library/Elementor all render the SVG correctly, while PNG-conversion is prevented.
Confirmed Fix (MU-Plugin)
Summary
'svg' => 'png'mapping inget_convertible_extensions()still applies even with SVG support enabled.rawbreaks inline rendering.Recommendation:
'svg' => 'png'conversion entirely.image/uploadwithf_svg,fl_sanitizeand.svgextension.This would make SVG support consistent and remove the need for custom MU-plugins.
Vdeub-cloudinary commentedon Aug 27, 2025
Hi @TheRealFreelancer, thanks for opening this bug and providing a
mu-plugin.I was also able to reproduce the issue on my side and I have reached out to the team to look at your solution.
We'll keep you posted on this!
TheRealFreelancer commentedon Aug 28, 2025
Hi @Vdeub-cloudinary, thank you for reaching out to the team. I'm glad you could reproduce the bug. Were you be able to also (temporarily) patch it with the mu-plugin? Regards
aatanasov-cloudinary commentedon Aug 30, 2025
Hi @TheRealFreelancer, thank you for reporting this issue.
We applied a general fix to the plugin, but it will be released in the next version.
Would you be able to test this fix on your side https://github.com/cloudinary/cloudinary_wordpress/pull/1088/files and confirm it works for your case (without using the mu-plugin)? You can modify the Cloudinary plugin temporarily for the test.
This is the PR: #1088
Thanks!
TheRealFreelancer commentedon Aug 30, 2025
Hi @aatanasov-cloudinary, thank you for taking action on this matter.
After modifying class-svg.php with your fix, I can confirm that it resolves the issue. Much appreciated.
Behavior:
Just a note: Turning off SVG Support after importing an SVG renders the imported file unusable (in a "Cloudinary Only" storage scenario). I'm not sure if this is intentional, but if someone deletes the "deactivated" SVG file, it removes the main file in Cloudinary. This could be a bit confusing. Maybe the user experience could be improved with that.
Vdeub-cloudinary commentedon Sep 17, 2025
@TheRealFreelancer, we have just released
3.2.13which embeds the fix for this issue.TheRealFreelancer commentedon Sep 21, 2025
I can confirm that the issue is resolved now.
aatanasov-cloudinary commentedon Oct 9, 2025
Hi @TheRealFreelancer , thanks for confirming. Closing this issue.
Regarding:
We discussed this internally, and that behaviour is expected, and we won't apply changes to it.