Media: enable AVIF support.
Add support for uploading, editing and saving AVIF images when supported by the server. Add 'image/avif' to supported mime types. Correctly identify AVIF images and sizes even when PHP doesn't support AVIF. Resize uploaded AVIF files (when supported) and use for front end markup. Props adamsilverstein, lukefiretoss, ayeshrajans, navjotjsingh, Tyrannous, jb510, gregbenz, nickpagz, JavierCasares, mukesh27, yguyon, swissspidy. Fixes #51228. Built from https://develop.svn.wordpress.org/trunk@57524 git-svn-id: http://core.svn.wordpress.org/trunk@57025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1263,7 +1263,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ( array( 'png', 'gif', 'jpg', 'jpeg', 'webp' ) as $ext ) {
|
||||
foreach ( array( 'png', 'gif', 'jpg', 'jpeg', 'webp', 'avif' ) as $ext ) {
|
||||
if ( file_exists( $this->get_stylesheet_directory() . "/screenshot.$ext" ) ) {
|
||||
$this->cache_add( 'screenshot', 'screenshot.' . $ext );
|
||||
if ( 'relative' === $uri ) {
|
||||
|
||||
Reference in New Issue
Block a user