Support » Plugin: SVG Support » A VERY GOOD TIP FOR THIS PLUGIN

  • marketingproflexoradea

    (@marketingproflexoradea)


    If, after installing, you have trouble showing SVG on your site, put this on your functions.php theme file:

    function add_file_types_to_uploads($file_types){
    $new_filetypes = array();
    $new_filetypes[‘svg’] = ‘image/svg+xml’;
    $file_types = array_merge($file_types, $new_filetypes );
    return $file_types;
    }
    add_action(‘upload_mimes’, ‘add_file_types_to_uploads’);

    For some reason, for me, the code above does not work independent of plugin and viceversa.

    And if, after you have done all that, you still have trouble showing a svg on Mozilla (for example logo) on your site, put this code on your css editor on your theme:

    @-moz-document url-prefix() {
    .logo {width:100% !important; max-width:180px !important;}
    }

    For some reason Mozilla seems to have trouble and it give width:0px. Chrome and Edge are alright.

Viewing 1 replies (of 1 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Thank you for your kind review and the tips for others!

    These should be addressed in my next update, but I’m very grateful that you took the time to come and share this with everyone 🙂

    Cheers

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this review.