0:00
Hello everyone, welcome to Key2 blogging and in this video I will show you how you can enable
0:04
WebP format in your WordPress website. So by default WebP is disabled in WordPress
0:11
So let me just show you. Go to the media library and here click on add new and select a WebP image
0:20
So this is a WebP file format. So click on it and as you can see the upload is
0:26
blocked by the WordPress and it is showing the file not is permitted due to security reasons
0:35
So you can easily bypass this by adding a plugins in your WordPress website or you can do it
0:42
manually by adding a PHP code in your theme editor. So let's check how you can do that
0:49
by using the plugin method. So here click on plugin and click on add new and here search for
0:58
allow WebP and install this plugin. Now click on activate
1:09
Now go to the media library again and here click on add new and select the WebP image again
1:21
And as you can see the image is uploaded and successfully added in the media library
1:27
So let me just disable the plugin and show you the manual method. So click on deactivate
1:39
Now go to the appearance section and click on theme editor. And here you have to select the function.php which is named as theme function and scroll down to the
1:53
bottom and now you have to paste a PHP code from here. So I will leave the code link in the
2:02
description. So just paste this code and click on update file. Now again go to the media library and let's upload this image again
2:24
And as you can see the WebP file image is uploaded without using any additional plugin
2:31
So in this way you can easily upload WebP images to your WordPress website without using a plugin
2:38
I hope this video helped you enable upload of WebP file format in WordPress
2:44
And here note that WebP file upload will support in the next WordPress update. So you can easily
2:52
remove that file from your theme editor. So if you don't want to add this code in your theme editor
3:00
then you can use a code snippet plugin like this and you can easily add the PHP code here and click
3:07
on run the script everywhere and save the changes. So it will add the PHP file in your theme editor
3:14
and you can easily enable or disable this from this code. And I will leave the code snippet
3:20
plugin in the description. And if you have any doubt regarding WebP file format and uploading
3:28
it in the WordPress then you can ask me in the comment section. And if this video helps you
3:34
then give it a like and subscribe to my channel for more upcoming videos like this. Thank you