Disable Gif for Post Image

Hi All,

I would like to disable Gif for the Post Image field, also hide the same from Accepted Extensions.

I tried editing js.php and no luck.

I know that can be possible via the File Upload field, but I would like to use Post Image.

Any help is highly appreciated.



Can you use this WordPress filter to prevent upload of the gif file type?

function disallow_gifs( $mime_types ) {
    unset( $mime_types['gif'] ); // Removes the .gif extension
    return $mime_types;
add_filter( 'upload_mimes', 'disallow_gifs', 1, 1 );

I am not sure if that affects the list of file types that are allowed or not.