• Hi there,

    I’m currently trying to upload some svgs to sliders I’m making using Slider Revolution, however when I try to add the svgs to the media library, the below error appears. I was wondering what could be causing this and how to resolve it?

    Many thanks,

    Callum

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Darin Kotter

    (@dkotter)

    Thanks for the question. This error will show if the svg file can’t be loaded for some reason. In that case, we can’t sanitize the file and so we show this error instead.

    Usually this means the svg file has some malformed structure and so it can’t be parsed properly. If you can share the svg file that you’re having issues with, I can take a closer look.

    Thread Starter cirrusmarketing

    (@cirrusmarketing)

    Hi Darin, thank you for your quick reply. Sure thing, there seems to be an issue with a few files, this one for example returns the error. Each of the svgs were made using the download as svg feature on Canva.

    Plugin Support Darin Kotter

    (@dkotter)

    I can’t access that file. If you could paste the contents of the svg into something like https://gist.github.com/ and share that with me, I can take a look at what might be wrong.

    Thread Starter cirrusmarketing

    (@cirrusmarketing)

    Apologies, here’s the link for the svg.

    Kind regards,

    Callum

    Plugin Support Darin Kotter

    (@dkotter)

    Sorry for the delay here, somehow missed the notification.

    But in looking a the SVG you shared and testing it myself, it seems the issue is with the file size. We use the built-in DOMDocument PHP library to parse through the SVG contents and it by default only supports 10Mb or less. This SVG is slightly over that threshold and thus can’t be processed correctly.

    I was not aware of that limit myself so I learned something here. Also seems like there’s a config option we could look to use to allow larger file sizes, so I have that on our list to investigate if there’s any downside to adding that

    Same problem on some images I have tried to upload. Here’s one from today: https://www.barkandzoom.com/templates/barkandzoom/svg/B&Z-Logo-Full-Color.svg

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘‘File couldn’t be sanitized’ error’ is closed to new replies.