[Resolved] Weird SVG Upload Problem

Home Forums Support [Resolved] Weird SVG Upload Problem

Home Forums Support Weird SVG Upload Problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1264710
    Anthony

    So a few weeks ago I used this code below to upload SVG files to my website:

    function cc_mime_types($mimes) {
    $mimes[‘svg’] = ‘image/svg+xml’;
    return $mimes;
    }
    add_filter(‘upload_mimes’, ‘cc_mime_types’);

    I then proceeded to add it to two other websites, all of which run on GeneratePress and the same server.

    The weird thing…I can now upload SVGs across my entire server of websites..

    So I kept digging…

    I went to some client’s websites that weren’t on my server but still used GeneratePress. And, sure enough. I can upload SVGs everywhere.

    I began digging more and did some plugin conflict test and things. And it seem that when GP Premium is enabled, I can upload SVGs freely…

    I noticed this post here:

    https://generatepress.com/forums/topic/svg-logo-2/

    Has there been any recent development on this?

    I thought I was going crazy and that the code I originally used somehow seeped into my server or was sharing a theme file somehow since I used the same Theme (GP) across all my websites.

    Is this something new or is it a problem with GP clashing with another constant I use, say a plugin or something I’m always using in conjunction with GP?

    Thanks

    #1265061
    Leo
    Staff
    Customer Support

    Hi there,

    This shouldn’t be a GP thing.

    I’m guessing that one of your other plugins is allowing uploading SVG files.

    You will need to go through the debugging tips – disable all plugins except GP Premium for each site to test if you haven’t already done so.

    A plugin should still be required to upload SVG:
    https://docs.generatepress.com/article/adding-svg-logo/#allowing-wordpress-to-upload-svg-files

    #1266007
    Anthony

    Hmm. I’ll test more but I already cycled through all the plugins and it seems to be GP premium.

    I’ll continue testing

    THanks

    #1266385
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.