In this article( How Can I upload WebP images on WordPress ), we want to fix the file upload error with different extensions on WordPress for you dear ones. Please stay with us.

As we know, different methods can be used for this, we will describe them in this article.

File conversion

This way you can convert your file to other extensions. You can easily do this using a converter program.

For example, if you want to upload a file with a WebP extension, you can easily convert it to PNG and JPG files using converter programs, or even if you have a video with an FLV extension, you can easily convert it to Convert to MP4, so there are no upload restrictions.

how to add webp to wordpress

One of these programs is file converter. To download this program, go to its reference site:

This site is completely free, and you can easily convert your files to different extensions.

Permission to upload file

There are two ways to do this, the first is to use coding and the second is to use different WordPress plugins.

In this article, we will explain both methods to you, but it is better to avoid installing unnecessary plugins, because in some cases, they will slow down your site. Therefore, we suggest you to use the second method, which is to add the code. You dear ones can also use this method to upload different WordPress fonts.

Use function

To use this method, just copy the code provided to you in your function file:

function novinadmin_mime_types( $mimes ) {
//How to add new formats:
$mimes[‘WebP’] = ‘image/webp’;
$mimes[‘apk’] = ‘application/’;
return $mimes;
add_filter( ‘upload_mimes’, ‘novinadmin_mime_types’ );

Permission to upload all extensions on WordPress

In this section, I will explain a very simple and practical and at the same time risky method for you:

In this method, just upload the following code to your function.php:


Using this method, you allow uploading any type of file to your WordPress, and for this reason, you can easily upload all the files in your WordPress. Also, uploading WordPress fonts from this method is very simple and easy. However, we do not recommend it.

Using the WP Extra File Types plugin ( WebP )

This plugin has some extensions that you can select to upload the file you want. If the extension you want does not exist in this plugin, add the extension you want using the first method and using the function, then select it from within the plugin.

I hope you have taken full advantage of reading the article on fixing file upload errors with different extensions on WordPress.

Use WebP images on wordpress