Issue with wp_get_attachment_image() and SVG file type
I’m trying to use SVG image with wp_get_attachment_image() but it is generating very weird output at the front end of the website. To support SVG file type I’ve first added the following function in my theme’s functions.php file /*** enable svg support ***/ function cc_mime_types($mimes) { $mimes[‘svg’] = ‘image/svg+xml’; return $mimes; } add_filter(‘upload_mimes’, ‘cc_mime_types’); Then … Read more