📜  无法将 webp 上传到 wordpress - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:27.943000             🧑  作者: Mango

代码示例1
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' );