Making WordPress Compatible with Jfif File Type Extension: A Simple Solution


By default, WordPress does not support the JFIF file type extension. For the make simple you only need to add this code your active theme functions.php file.

<?php
add_filter( 'upload_mimes', 'custom_mime_types', 1, 1 );
function custom_mime_types( $mime_types ) {
$mime_types['jfif'] = 'image/jfif+xml'; // Adding .jfif extension

return $mime_types;
}
?>

Note: JFIF is a variant of the JPEG file format and is compatible with most modern web browsers. However, it is not as widely supported as the standard JPEG format, so it is important to consider the compatibility of your audience before using this file type.

Source: https://developer.wordpress.org/reference/hooks/upload_mimes/

Nandemo Webtools

Leave a Reply