if ( false !==
$info ) { return $info;
} /*
* For PHP versions that don't support WebP images,
* extract the image size info from the file headers.
*/
if ( 'image/webp' ===
wp_get_image_mime( $filename ) ) { $webp_info =
wp_get_webp_info( $filename );
$width =
$webp_info['width'
];
$height =
$webp_info['height'
];
// Mimic the native return format.
if ( $width &&
$height ) { return array
( $width,
$height,
IMAGETYPE_WEBP,
sprintf( 'width="%d" height="%d"',