diff --git src/wp-admin/includes/image-edit.php src/wp-admin/includes/image-edit.php
index ce80a69ad5..416f69c998 100644
--- src/wp-admin/includes/image-edit.php
+++ src/wp-admin/includes/image-edit.php
@@ -306,6 +306,12 @@ function wp_stream_image( $image, $mime_type, $attachment_id ) {
 			case 'image/gif':
 				header( 'Content-Type: image/gif' );
 				return imagegif( $image );
+			case 'image/webp':
+				if ( function_exists( 'imagewebp' ) ) {
+					header( 'Content-Type: image/webp' );
+					return imagewebp( $image, null, 90 );
+				}
+				return false;
 			default:
 				return false;
 		}
@@ -391,6 +397,11 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
 				return imagepng( $image, $filename );
 			case 'image/gif':
 				return imagegif( $image, $filename );
+			case 'image/webp':
+				if ( function_exists( 'imagewebp' ) ) {
+					return imagewebp( $image, null, apply_filters( 'jpeg_quality', 90, 'edit_image' ) );
+				}
+				return false;
 			default:
 				return false;
 		}
diff --git src/wp-admin/includes/image.php src/wp-admin/includes/image.php
index 56b9c0a36f..53e0cc4224 100644
--- src/wp-admin/includes/image.php
+++ src/wp-admin/includes/image.php
@@ -517,6 +517,9 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
 				case 'image/png':
 					$ext = '.png';
 					break;
+				case 'image/webp':
+					$ext = '.webp';
+					break;
 			}
 			$basename = str_replace( '.', '-', wp_basename( $file ) ) . '-image' . $ext;
 			$uploaded = wp_upload_bits( $basename, '', $metadata['image']['data'] );
@@ -962,6 +965,13 @@ function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) {
 		case 'image/gif':
 			$image = imagecreatefromgif( $filepath );
 			break;
+		case 'image/webp':
+			if ( function_exists( 'imagecreatefromwebp' ) ) {
+				$image = imagecreatefromwebp( $filepath );
+			} else {
+				$image = false;
+			}
+			break;
 		default:
 			$image = false;
 			break;
diff --git src/wp-admin/includes/media.php src/wp-admin/includes/media.php
index 567cd1f823..4d3d2f3950 100644
--- src/wp-admin/includes/media.php
+++ src/wp-admin/includes/media.php
@@ -993,7 +993,7 @@ function wp_media_upload_handler() {
 function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'html' ) {
 	if ( ! empty( $file ) ) {
 
-		$allowed_extensions = array( 'jpg', 'jpeg', 'jpe', 'png', 'gif' );
+		$allowed_extensions = array( 'jpg', 'jpeg', 'jpe', 'png', 'gif', 'webp' );
 
 		/**
 		 * Filters the list of allowed file extensions when sideloading an image from a URL.
diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php
index a59c7c36ce..6f528f2288 100644
--- src/wp-admin/includes/schema.php
+++ src/wp-admin/includes/schema.php
@@ -1215,6 +1215,7 @@ We hope you enjoy your new site. Thanks!
 		'jpeg',
 		'png',
 		'gif',
+		'webp',
 		// Video.
 		'mov',
 		'avi',
diff --git src/wp-includes/ID3/getid3.lib.php src/wp-includes/ID3/getid3.lib.php
index 3a5983fc26..64de92589a 100644
--- src/wp-includes/ID3/getid3.lib.php
+++ src/wp-includes/ID3/getid3.lib.php
@@ -1511,7 +1511,7 @@ class getid3_lib
 			if (is_writable($tempfilename) && is_file($tempfilename) && ($tmp = fopen($tempfilename, 'wb'))) {
 				fwrite($tmp, $imgData);
 				fclose($tmp);
-				$GetDataImageSize = @getimagesize($tempfilename, $imageinfo);
+				$GetDataImageSize = wp_getimagesize($tempfilename, $imageinfo);
 				if (($GetDataImageSize === false) || !isset($GetDataImageSize[0]) || !isset($GetDataImageSize[1])) {
 					return false;
 				}
diff --git src/wp-includes/ID3/getid3.php src/wp-includes/ID3/getid3.php
index 5cb3c036c0..a5a9b50589 100644
--- src/wp-includes/ID3/getid3.php
+++ src/wp-includes/ID3/getid3.php
@@ -1183,7 +1183,14 @@ class getID3
 							'fail_id3'  => 'ERROR',
 							'fail_ape'  => 'ERROR',
 						),
-
+				'webp' => array(
+						'pattern'   => '^WEBP',
+						'group'     => 'graphic',
+						'module'    => 'webp',
+						'mime_type' => 'image/webp',
+						'fail_id3'  => 'ERROR',
+						'fail_ape'  => 'ERROR',
+					),
 				// PCD  - still image - Kodak Photo CD
 				'pcd'  => array(
 							'pattern'   => '^.{2048}PCD_IPI\\x00',
diff --git src/wp-includes/class-wp-image-editor-gd.php src/wp-includes/class-wp-image-editor-gd.php
index ed0a7be279..1ca72e9e27 100644
--- src/wp-includes/class-wp-image-editor-gd.php
+++ src/wp-includes/class-wp-image-editor-gd.php
@@ -69,6 +69,8 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
 				return ( $image_types & IMG_PNG ) != 0;
 			case 'image/gif':
 				return ( $image_types & IMG_GIF ) != 0;
+			case 'image/webp':
+				return ( $image_types & IMG_WEBP ) != 0;
 		}
 
 		return false;
@@ -99,7 +101,15 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
 			return new WP_Error( 'error_loading_image', __( 'File doesn&#8217;t exist?' ), $this->file );
 		}
 
-		$this->image = @imagecreatefromstring( $file_contents );
+		// WebP may not work with imagecreatefromstring().
+		if (
+			function_exists( 'imagecreatefromwebp' ) &&
+			( 'image/webp' === wp_get_image_mime( $this->file ) )
+		) {
+			$this->image = @imagecreatefromwebp( $this->file );
+		} else {
+			$this->image = @imagecreatefromstring( $file_contents );
+		}
 
 		if ( ! is_gd_image( $this->image ) ) {
 			return new WP_Error( 'invalid_image', __( 'File is not an image.' ), $this->file );
@@ -459,6 +469,10 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
 			if ( ! $this->make_image( $filename, 'imagejpeg', array( $image, $filename, $this->get_quality() ) ) ) {
 				return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
 			}
+		} elseif ( 'image/webp' == $mime_type ) {
+			if ( ! $this->make_image( $filename, 'imagewebp', array( $image, $filename, $this->get_quality() ) ) ) {
+				return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
+			}
 		} else {
 			return new WP_Error( 'image_save_error', __( 'Image Editor Save Failed' ) );
 		}
@@ -502,6 +516,12 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
 			case 'image/gif':
 				header( 'Content-Type: image/gif' );
 				return imagegif( $this->image );
+			case 'image/webp':
+				if ( function_exists( 'imagewebp' ) ) {
+					header( 'Content-Type: image/webp' );
+					return imagewebp( $this->image, null, $this->get_quality() );
+				}
+				// Fall back to the default if webp isn't supported.
 			default:
 				header( 'Content-Type: image/jpeg' );
 				return imagejpeg( $this->image, null, $this->get_quality() );
diff --git src/wp-includes/class-wp-theme.php src/wp-includes/class-wp-theme.php
index d9ccf6b6ba..b365f45715 100644
--- src/wp-includes/class-wp-theme.php
+++ src/wp-includes/class-wp-theme.php
@@ -1141,7 +1141,7 @@ final class WP_Theme implements ArrayAccess {
 			return false;
 		}
 
-		foreach ( array( 'png', 'gif', 'jpg', 'jpeg' ) as $ext ) {
+		foreach ( array( 'png', 'gif', 'jpg', 'jpeg', 'webp' ) as $ext ) {
 			if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) {
 				$this->cache_add( 'screenshot', 'screenshot.' . $ext );
 				if ( 'relative' === $uri ) {
diff --git src/wp-includes/compat.php src/wp-includes/compat.php
index 7f6c59f03c..c68c215bd3 100644
--- src/wp-includes/compat.php
+++ src/wp-includes/compat.php
@@ -370,3 +370,11 @@ if ( ! function_exists( 'is_iterable' ) ) {
 		return ( is_array( $var ) || $var instanceof Traversable );
 	}
 }
+
+// WebP constants may not be defined, even in cases where the format is supported.
+if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
+	define( 'IMAGETYPE_WEBP', 18 );
+}
+if ( ! defined( 'IMG_WEBP' ) ) {
+	define( 'IMG_WEBP', IMAGETYPE_WEBP );
+}
diff --git src/wp-includes/customize/class-wp-customize-media-control.php src/wp-includes/customize/class-wp-customize-media-control.php
index fc4801a96e..1dc1b8c277 100644
--- src/wp-includes/customize/class-wp-customize-media-control.php
+++ src/wp-includes/customize/class-wp-customize-media-control.php
@@ -91,7 +91,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
 				// Fake an attachment model - needs all fields used by template.
 				// Note that the default value must be a URL, NOT an attachment ID.
 				$ext  = substr( $this->setting->default, -3 );
-				$type = in_array( $ext, array( 'jpg', 'png', 'gif', 'bmp' ), true ) ? 'image' : 'document';
+				$type = in_array( $ext, array( 'jpg', 'png', 'gif', 'bmp', 'webp' ), true ) ? 'image' : 'document';
 
 				$default_attachment = array(
 					'id'    => 1,
diff --git src/wp-includes/deprecated.php src/wp-includes/deprecated.php
index 72a23cd836..4379fadda5 100644
--- src/wp-includes/deprecated.php
+++ src/wp-includes/deprecated.php
@@ -3340,6 +3340,8 @@ function gd_edit_image_support($mime_type) {
 				return (imagetypes() & IMG_PNG) != 0;
 			case 'image/gif':
 				return (imagetypes() & IMG_GIF) != 0;
+			case 'image/webp':
+				return (imagetypes() & IMG_WEBP) != 0;
 		}
 	} else {
 		switch( $mime_type ) {
@@ -3349,6 +3351,8 @@ function gd_edit_image_support($mime_type) {
 				return function_exists('imagecreatefrompng');
 			case 'image/gif':
 				return function_exists('imagecreatefromgif');
+			case 'image/webp':
+				return function_exists('imagecreatefromwebp');
 		}
 	}
 	return false;
diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index b716c6bc1f..8dda8c738d 100644
--- src/wp-includes/formatting.php
+++ src/wp-includes/formatting.php
@@ -3318,7 +3318,7 @@ function translate_smiley( $matches ) {
 
 	$matches    = array();
 	$ext        = preg_match( '/\.([^.]+)$/', $img, $matches ) ? strtolower( $matches[1] ) : false;
-	$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
+	$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
 
 	// Don't convert smilies that aren't images - they're probably emoji.
 	if ( ! in_array( $ext, $image_exts, true ) ) {
diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index 56d5fd9f43..822c9fc796 100644
--- src/wp-includes/functions.php
+++ src/wp-includes/functions.php
@@ -2886,6 +2886,7 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
 					'image/gif'  => 'gif',
 					'image/bmp'  => 'bmp',
 					'image/tiff' => 'tif',
+					'image/webp' => 'webp',
 				)
 			);
 
@@ -3063,6 +3064,23 @@ function wp_get_image_mime( $file ) {
 		} else {
 			$mime = false;
 		}
+
+		// WebP support took longer to land in Exif than GD.
+		if ( ! $mime ) {
+			$handle = fopen( $file, 'rb' );
+			if ( $handle ) {
+				$magic = bin2hex( fread( $handle, 12 ) );
+				if (
+					// RIFF.
+					( 0 === strpos( $magic, '52494646' ) ) &&
+					// WEBP.
+					( 16 === strpos( $magic, '57454250' ) )
+				) {
+					$mime = 'image/webp';
+				}
+				fclose( $handle );
+			}
+		}
 	} catch ( Exception $e ) {
 		$mime = false;
 	}
@@ -3222,7 +3240,7 @@ function wp_get_ext_types() {
 	return apply_filters(
 		'ext2type',
 		array(
-			'image'       => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'heic' ),
+			'image'       => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'heic', 'webp' ),
 			'audio'       => array( 'aac', 'ac3', 'aif', 'aiff', 'flac', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ),
 			'video'       => array( '3g2', '3gp', '3gpp', 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ),
 			'document'    => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'xps', 'oxps', 'rtf', 'wp', 'wpd', 'psd', 'xcf' ),
diff --git src/wp-includes/media.php src/wp-includes/media.php
index b0e2c79aef..ff64bd2e9b 100644
--- src/wp-includes/media.php
+++ src/wp-includes/media.php
@@ -1174,7 +1174,7 @@ function _wp_get_attachment_relative_path( $file ) {
  *     @type int $1 Image height.
  * }
  */
-function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
+function _wp_getimagesize_from_meta( $size_name, $image_meta ) {
 	if ( 'full' === $size_name ) {
 		return array(
 			absint( $image_meta['width'] ),
@@ -1490,7 +1490,7 @@ function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null,
 		}
 
 		if ( is_array( $image_meta ) ) {
-			$size_array = _wp_get_image_size_from_meta( $size, $image_meta );
+			$size_array = _wp_getimagesize_from_meta( $size, $image_meta );
 			if ( $size_array ) {
 				$width = absint( $size_array[0] );
 			}
@@ -4974,6 +4974,7 @@ function wp_show_heic_upload_error( $plupload_settings ) {
  * Allows PHP's getimagesize() to be debuggable when necessary.
  *
  * @since 5.7.0
+ * @since 5.8.0 Added support for WebP images.
  *
  * @param string $filename  The file path.
  * @param array  $imageinfo Extended image information, passed by reference.
@@ -4987,7 +4988,7 @@ function wp_getimagesize( $filename, &$imageinfo = array() ) {
 		// Return without silencing errors when in debug mode.
 		defined( 'WP_DEBUG' ) && WP_DEBUG
 	) {
-		return getimagesize( $filename, $imageinfo );
+		return _get_image_size( $filename, $imageinfo );
 	}
 
 	/*
@@ -5001,5 +5002,89 @@ function wp_getimagesize( $filename, &$imageinfo = array() ) {
 	 *
 	 * phpcs:ignore WordPress.PHP.NoSilencedErrors
 	 */
-	return @getimagesize( $filename, $imageinfo );
+	return @_get_image_size( $filename, $imageinfo );
 }
+
+/**
+ * Get the image size, with support for WebP images.
+ *
+ * @since 5.8.0
+ *
+ * @param string $filename  The file path.
+ * @param array  $imageinfo Extended image information, passed by reference.
+ */
+function _get_image_size( $filename, &$imageinfo = array() ) {
+	// Try getimagesize() first.
+	$info = getimagesize( $file, $info );
+	if ( false !== $info ) {
+		return $info;
+	}
+
+	// For PHP versions that don't support WebP images, pull info from the file headers.
+	if ( 'image/webp' === wp_get_image_mime( $file ) ) {
+		try {
+			$handle = fopen( $file, 'rb' );
+			if ( $handle ) {
+				$magic = fread( $handle, 40 );
+				fclose( $handle );
+
+				// Make sure we got enough bytes.
+				if ( strlen( $magic ) < 40 ) {
+					return false;
+				}
+
+				$width = false;
+				$height = false;
+
+				// The headers are a little different for each of the three formats.
+				switch ( substr( $magic, 12, 4 ) ) {
+					// Lossy WebP.
+					case 'VP8 ':
+						$parts  = unpack( 'v2', substr( $magic, 26, 4 ) );
+						$width  = (int) ( $parts[1] & 0x3FFF );
+						$height = (int) ( $parts[2] & 0x3FFF );
+						break;
+					// Lossless WebP.
+					case 'VP8L':
+						$parts  = unpack( 'C4', substr( $magic, 21, 4 ) );
+						$width  = (int) ( $parts[1] | ( ( $parts[2] & 0x3F ) << 8 ) ) + 1;
+						$height = (int) ( ( ( $parts[2] & 0xC0 ) >> 6 ) |
+										( $parts[3] << 2 ) | ( ( $parts[4] & 0x03 ) << 10 ) ) + 1;
+						break;
+					// Animated/alpha WebP.
+					case 'VP8X':
+						// Pad 24-bit int.
+						$width = unpack( 'V', substr( $magic, 24, 3 ) . "\x00" );
+						$width = (int) ( $width[1] & 0xFFFFFF ) + 1;
+
+						// Pad 24-bit int.
+						$height = unpack( 'V', substr( $magic, 27, 3 ) . "\x00" );
+						$height = (int) ( $height[1] & 0xFFFFFF ) + 1;
+						break;
+				}
+
+				// Mimic the native return format.
+				if ( $width && $height ) {
+					return array(
+						$width,
+						$height,
+						IMAGETYPE_WEBP,
+						sprintf(
+							'width="%d" height="%d"',
+							$width,
+							$height
+						),
+						'mime' => 'image/webp',
+					);
+				}
+
+				// The image could not be parsed.
+				return false;
+			}
+		} catch ( Exception $e ) {
+			return false;
+		}
+
+		return false;
+	}
+}
\ No newline at end of file
diff --git src/wp-includes/post.php src/wp-includes/post.php
index 36b3a1aa79..fb4ea6b9af 100644
--- src/wp-includes/post.php
+++ src/wp-includes/post.php
@@ -6522,7 +6522,7 @@ function wp_attachment_is( $type, $post = null ) {
 
 	switch ( $type ) {
 		case 'image':
-			$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
+			$image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
 			return in_array( $ext, $image_exts, true );
 
 		case 'audio':
diff --git tests/phpunit/tests/functions.php tests/phpunit/tests/functions.php
index f485d3b4ec..75a2ecf5e0 100644
--- tests/phpunit/tests/functions.php
+++ tests/phpunit/tests/functions.php
@@ -1225,6 +1225,29 @@ class Tests_Functions extends WP_UnitTestCase {
 		$this->assertSame( $expected, wp_get_image_mime( $file ) );
 	}
 
+	/**
+	 * @ticket 35725
+	 * @dataProvider _wp_getimagesize
+	 */
+	public function test_wp_getimagesize( $file, $expected ) {
+		if ( ! is_callable( 'exif_imagetype' ) && ! function_exists( 'getimagesize' ) ) {
+			$this->markTestSkipped( 'The exif PHP extension is not loaded.' );
+		}
+
+		$result = wp_getimagesize( $file );
+
+		// The getimagesize() function varies in its response, so
+		// let's restrict comparison to expected keys only.
+		if ( is_array( $expected ) ) {
+			foreach ( $expected as $k => $v ) {
+				$this->assertEquals( true, isset( $result[ $k ] ) );
+				$this->assertEquals( $expected[ $k ], $result[ $k ] );
+			}
+		} else {
+			$this->assertEquals( $expected, $result );
+		}
+	}
+
 	/**
 	 * @ticket 39550
 	 * @dataProvider _wp_check_filetype_and_ext_data
@@ -1313,6 +1336,129 @@ class Tests_Functions extends WP_UnitTestCase {
 				DIR_TESTDATA . '/images/test-image-mime-jpg.png',
 				'image/jpeg',
 			),
+			// Animated WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-animated.webp',
+				'image/webp',
+			),
+			// Lossless WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-lossless.webp',
+				'image/webp',
+			),
+			// Lossy WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-lossy.webp',
+				'image/webp',
+			),
+			// Transparent WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-transparent.webp',
+				'image/webp',
+			),
+			// Not an image.
+			array(
+				DIR_TESTDATA . '/uploads/dashicons.woff',
+				false,
+			),
+		);
+
+		return $data;
+	}
+
+	/**
+	 * Data profider for test_wp_getimagesize();
+	 */
+	public function _wp_getimagesize() {
+		$data = array(
+			// Standard JPEG.
+			array(
+				DIR_TESTDATA . '/images/test-image.jpg',
+				array(
+					50,
+					50,
+					IMAGETYPE_JPEG,
+					'width="50" height="50"',
+					'mime' => 'image/jpeg',
+				),
+			),
+			// Standard GIF.
+			array(
+				DIR_TESTDATA . '/images/test-image.gif',
+				array(
+					50,
+					50,
+					IMAGETYPE_GIF,
+					'width="50" height="50"',
+					'mime' => 'image/gif',
+				),
+			),
+			// Standard PNG.
+			array(
+				DIR_TESTDATA . '/images/test-image.png',
+				array(
+					50,
+					50,
+					IMAGETYPE_PNG,
+					'width="50" height="50"',
+					'mime' => 'image/png',
+				),
+			),
+			// Image with wrong extension.
+			array(
+				DIR_TESTDATA . '/images/test-image-mime-jpg.png',
+				array(
+					50,
+					50,
+					IMAGETYPE_JPEG,
+					'width="50" height="50"',
+					'mime' => 'image/jpeg',
+				),
+			),
+			// Animated WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-animated.webp',
+				array(
+					100,
+					100,
+					IMAGETYPE_WEBP,
+					'width="100" height="100"',
+					'mime' => 'image/webp',
+				),
+			),
+			// Lossless WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-lossless.webp',
+				array(
+					1200,
+					675,
+					IMAGETYPE_WEBP,
+					'width="1200" height="675"',
+					'mime' => 'image/webp',
+				),
+			),
+			// Lossy WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-lossy.webp',
+				array(
+					1200,
+					675,
+					IMAGETYPE_WEBP,
+					'width="1200" height="675"',
+					'mime' => 'image/webp',
+				),
+			),
+			// Transparent WebP.
+			array(
+				DIR_TESTDATA . '/images/webp-transparent.webp',
+				array(
+					1200,
+					675,
+					IMAGETYPE_WEBP,
+					'width="1200" height="675"',
+					'mime' => 'image/webp',
+				),
+			),
 			// Not an image.
 			array(
 				DIR_TESTDATA . '/uploads/dashicons.woff',
diff --git tests/phpunit/tests/image/functions.php tests/phpunit/tests/image/functions.php
index 1694c1e7f1..f2fb854f28 100644
--- tests/phpunit/tests/image/functions.php
+++ tests/phpunit/tests/image/functions.php
@@ -59,6 +59,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
 			'test-image.psd',
 			'test-image-zip.tiff',
 			'test-image.jpg',
+			'webp-animated.webp',
+			'webp-lossless.webp',
+			'webp-lossy.webp',
+			'webp-transparent.webp',
 		);
 
 		// IMAGETYPE_ICO is only defined in PHP 5.3+.
@@ -90,6 +94,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
 			'test-image.gif',
 			'test-image.png',
 			'test-image.jpg',
+			'webp-animated.webp',
+			'webp-lossless.webp',
+			'webp-lossy.webp',
+			'webp-transparent.webp',
 		);
 
 		// IMAGETYPE_ICO is only defined in PHP 5.3+.
@@ -172,6 +180,7 @@ class Tests_Image_Functions extends WP_UnitTestCase {
 			'image/jpeg',
 			'image/gif',
 			'image/png',
+			'image/webp',
 		);
 
 		// Test each image editor engine.
@@ -270,7 +279,8 @@ class Tests_Image_Functions extends WP_UnitTestCase {
 			'jpe'  => 'image/jpeg',
 			'gif'  => 'image/gif',
 			'png'  => 'image/png',
-			'unk'  => 'image/jpeg', // Default, unknown.
+			'webp' => 'image/webp',
+			'unk'  => 'image/jpeg',   // Default, unknown.
 		);
 
 		// Test each image editor engine.
