Last active
February 17, 2024 20:26
-
-
Save stuartduff/9188b5b904bf66b4b98e724b457fa91a to your computer and use it in GitHub Desktop.
Add webp MIME to be supported with the default WooCommerce Product Importer
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 add_additonal_wc_mime_types($mime_types) { | |
$mime_types['webp'] = 'image/webp'; // Add support for webp images in the WooCommerce Product importer. | |
return $mime_types; | |
} | |
add_filter('woocommerce_rest_allowed_image_mime_types', 'add_additonal_wc_mime_types', 1, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment