News Update :
Home » » Add .svg images in the WordPress library

Add .svg images in the WordPress library

By: Unknown on Sunday 15 February 2015 | 08:08

By default WordPress does not accept the extension .svg is a vector format.

But it added in function.php this code, it is possible.


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



 





The purpose of adding this extension is to alleviate pictures, everything vector, logo, icon ....

Unfortunately, that's not all browsers that support .svg. Our dear indeed IE8 does not support it and Android too.

So one of the techniques is to use JavaScript Bookseller Modernizr SVG
 
Contact Us | Privacy policy | Term of use | Advertise with Us | Site map
Copyright © 2011. Blogging Brain . All Rights Reserved.
Design Template by Blogging Brain | | Powered by Blogger