Last active
February 22, 2022 04:58
-
-
Save mymizan/6172de7a5ef3281e8100616d8ac785c8 to your computer and use it in GitHub Desktop.
Allow uploading of webp image by media media_sideload_image()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Allow webp for media_sideload function. | |
*/ | |
add_filter( 'image_sideload_extensions', 'woonet_add_types', 10, 1 ); | |
function woonet_add_types( $ext ) { | |
$ext[] = 'webp'; | |
return $ext; | |
} |
Happy to know it helped. :)
…On Tue, Feb 22, 2022 at 4:48 AM Sagive SEO ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
10x Yakub... did similarly but for some reason, it didn't work. 👍🙏
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/6172de7a5ef3281e8100616d8ac785c8#gistcomment-4073586>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5NJJT43QSWDRGHYL334DU4K6MJANCNFSM5O7YG6RA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
10x Yakub... did similarly but for some reason, mine didn't work. 👍🙏