Let’s get started, shall we?
Today i will show you how to change/modify upload file format in WordPress using cPanel and File manager Plugin in WordPress.
Let's Login to you cPanel by (example: www.yourdomain.com/cpanel )
Login using cPanel Credentials by using the URL www.yourdomain.com/cpanel or using port number www. yourdomain.com:2083 the port number is differ by in which the port the cpanel&whm installed in the hosting server.
Now go to you cPanel file manager find the function.php file in where the WordPress installed folder
function.php file path: in WordPress installed folder Go to –> wp-includes –> fucntion.php
Edit function.php file by –> Select –> Right Click the function.php and click –> EDIT
Edit function.php file
Find the line number 2535 add the file format in the apply_filter function. example now i am going the add webp format by default WordPress media library does not support webp format.
Add file format in Line no: 2535
You can change/ modify/ add/ delete Image, Video, Documents, Audio all type of file format. update on ‘wp_get_image_mime’ ‘, ‘wp_get_video_mime’, etc array function.
Add image formate or file format "only add file extention (example: png, svg , jpg)"
Add file format in Line no: 2721
You can change/ modify/ add/ delete Image, Video, Documents, Audio all type of file format. update on ”mime_type’ array function.
Add file format in Line no: 2847
You can change/ modify/ add/ delete Image, Video, Documents, Audio all type of file format. update on ”ext2type’ array function.
Save the function.php file
Login to your WordPress dashboard
Upload the "webp image file" test the change
In WordPress dashboard :”Go to in Media —> Library —> New Image —> Upload the Webp image file