Hi there, as you may know
The new thing to the market is avif, wordpress itself can support this image and the sizing and such are available there.
But with classicpress it’s not available. any thoughts?
FYI:
<?php
/**
* Enable AVIF types
*
* @see https://developer.wordpress.org/reference/functions/wp_check_filetype_and_ext/
*/
function mhmd_enable_avif_types( $types, $file, $filename, $mimes ) {
if ( false !== strpos( $filename, '.avif' ) ) {
$types['ext'] = 'avif';
$types['type'] = 'image/avif';
}
return $types;
}
add_filter( 'wp_check_filetype_and_ext', 'mhmd_enable_avif_types', 10, 4 );
/**
* Add mime type
*
* @see https://developer.wordpress.org/reference/hooks/upload_mimes/
*/
function mhmd_enable_avif_mime( $mimes ) {
$mimes['avif'] = 'image/avif';
return $mimes;
}
add_filter( 'upload_mimes', 'mhmd_enable_avif_mime' );