📜  将 Webp 上传到 Wordpress - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:08.580000             🧑  作者: Mango

代码示例2
function webp_upload_mimes( $existing_mimes ) {
    // add webp to the list of mime types
    $existing_mimes['webp'] = 'image/webp';

    // return the array back to the function with our added mime type
    return $existing_mimes;
}
add_filter( 'mime_types', 'webp_upload_mimes' );