• deeveedee

    (@deeveedee)


    It appears that WP 4.7.2 does not include image/png in its allowed MIME types. I have tried to add “png = image/png” using your plugin, but png uploads are still not allowed. I’m new to WP MIME type configuration, so I’m sure I’m doing something wrong. Do you have any suggestions? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter deeveedee

    (@deeveedee)

    Not sure if I’m helping to identify the problem or just confusing things, but if I add the function/filter below to my child theme’s functions.php, then I can add image/png MIME type with your plugin. Note that if I add the following to my functions.php, then I don’t need to add the image/png MIME type with your plugin. Just reporting this in case it helps to resolve a problem with the plugin. Thank you.

    
    /* Add .png to allowed WP MIME types */
    function custom_upload_mimes( $existing_mimes=array() ) {
    	// add png to the list of mime types
    	$existing_mimes['png'] = 'image/png';
    
    	// return the array back to the function with our added mime type
    	return $existing_mimes;
    }
    add_filter( 'upload_mimes', 'custom_upload_mimes' );
    
    • This reply was modified 8 years ago by deeveedee.
    • This reply was modified 8 years ago by deeveedee.
    Plugin Author kimipooh

    (@kimipooh)

    Hi deeveedee.

    Thank you for your comments.
    I could upload a png file on WordPress 4.7.2 even if my plugin was deactivated.
    Thus, please try to upload a png file when you change other theme or deactivate other plugins.

    Well, WordPress media upload issue is due to ‘finfo_open’ php function.
    The issue will be fixed on WordPress 4.7.3.
    (Reference: https://core.trac.www.ads-software.com/ticket/39550)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding image/png MIME type to WP 4.7.2’ is closed to new replies.