Created
February 11, 2023 12:17
-
-
Save mikeoberdick/0ca209b94f8dcd5fb0df239884e52f15 to your computer and use it in GitHub Desktop.
Automatically convert wordpress thumbs to .webp format when thumbnails are generated including custom thumbs
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
function psc_image_editor_output_format( $formats ) { | |
$formats['image/png'] = 'image/webp'; | |
return $formats; | |
} | |
add_filter( 'image_editor_output_format', 'psc_image_editor_output_format' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment