mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-14 05:40:30 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57524 602fd350-edb4-49c9-b593-d223f7449a82
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