Learn How to Enable WordPress Media to Accept Files With the jfif Extension with our step-by-step guide. Follow our simple instructions to ensure your jfif images are optimized for your website and look great for your visitors. Increase your website’s visual appeal and engagement by uploading your jfif files into WordPress today!
So, to apply the required code, you should follow these steps:
> log in to your cPanel account;
> navigate to the File Manager menu;
> go to ~/dailyooms.com/wp-content/themes/generatepress folder and right-click on the functions.php file.
To go to the specified folder, you may just copy the path, which is /dailyooms.com/wp-content/themes/generatepress, and paste it here and click “Go”.

Once you right-click on the functions.php file, choose ‘Edit’
> Paste the below codes to the top of the file and click ‘Save Changes’.
as per the subject How to Enable WordPress Media to Accept Files With the jfif Extension you need to ensure compatibility with JFIF files, it’s necessary to include their file extension in the list of accepted formats, given that JFIF is essentially a variant of the JPG format and has its own corresponding MIME type.
here is the first code you need to ad
<?php
add_filter('mime_types', 'dd_add_jfif_files');
function dd_add_jfif_files($mimes){
$mimes['jfif'] = "image/jpeg";
return $mimes;
}
You can Enable WordPress Media to Accept Files With the jfif Extension by adding the following code to the functions.php file of your active theme. This will filter the list of allowed mime-types and file extensions to include .jfif files.
here is the second code you need to ad
<?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;
}
?>
The important thing to mention, the current theme is Generate Press, which is why we chose the /wp-content/themes/generatepress folder. If you use another theme, for example, Twenty-Fourteen, you will need to use its own folder. The path to this folder would be:
/wp-content/themes/twenty fourteen.
Basically, all the themes folders for dailyooms.com domain are located at the ~/dailyooms.com/wp-content/themes folder.
so now you can enjoy Increasing your website’s visual appeal and engagement by uploading your jfif files into WordPress today!