• Elegant solution! Is it possible to add SVGZ to the mimes list, or does the sanitize lib not support that?

    public function allow_svg( $mimes ) {
        $mimes['svg'] = 'image/svg+xml';
        $mimes['svgz'] = 'image/svg+xml';
    
        return $mimes;
    }

    Thanks, mate. I’ve grown sick of mucking around with WordPress always trying to kill SVGs (!!), so this is helpful.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Daryll Doyle

    (@enshrined)

    Hi @hendridm,

    I’ve just released version 1.3.3 which allows SVGZ uploads also ??

    Sorry for the delay!

    Cheers,
    Daryll

    Never worked for me. You make it possible to upload but it is not correlating correctly with the rows in .htaccess. Always shows a broken image with your plugin, the only thing that works for me is manually add everything.

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Hi alriksson,

    I’ve just tested this locally and can confirm that SVGZ files are uploading and displaying correctly. If you’re seeing a broken image I’d imagine that your server isn’t serving the correct headers for the file.

    If you’d like to look into this further please open your own support ticket so that I can track it and help.

    Cheers,
    Daryll

    I checked that and it is served as: Content-Type:image/svg+xml
    Okay I open a ticket for that cool.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can you add SVGZ to MIME types?’ is closed to new replies.