Hi Amadeo,
Thank you for reaching out to us. For security reasons WordPress restricts uploading the svg images, instead of your custom code, I’d recommend you to use a third party plugin that adds svg support in WordPress. Here’s a tutorial that you can follow to enable the svg support https://www.wpbeginner.com/wp-tutorials/how-to-add-svg-in-wordpress/
After the plugin installation and once you upload the svg image in the media library, add an Image element in the Content Builder, select your uploaded svg image from the media library and then make sure to set the Base Width in the Image element’s settings (see screenshot)
Please note that we do not provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script.
Let us know how this goes!