bharatmakwana

Support Webp Image

Dec 1st, 2020 (edited)
1,415
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function webp_upload_mimes( $existing_mimes ) {
  2.     // add webp to the list of mime types
  3.     $existing_mimes['webp'] = 'image/webp';
  4.  
  5.     // return the array back to the function with our added mime type
  6.     return $existing_mimes;
  7. }
  8. add_filter( 'mime_types', 'webp_upload_mimes' );
RAW Paste Data