> ## Content Index
> Fetch the complete content index at: https://www.boldoutlook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Allow SVG through WordPress Media Uploader
- URL: https://www.boldoutlook.com/allow-svg-wordpress-media-uploader/
- Published: 2016-06-27T19:10:00.000Z
- Updated: 2025-07-25T04:28:14.000Z
- Description: Add the following to your theme’s functions.php file to allow .svg files to be uploaded through the WordPress media uploader:
- Author: Brandon Himpfen
- Tags: Digital, WordPress, PHP, PHP Snippets, WordPress Snippets, Code Snippets, #Import 2026-10-18 13:20

Add the following to your theme’s functions.php file to allow .svg files to be uploaded through the WordPress media uploader:

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

```