Skip to content

Commit 4204621

Browse files
committed
fix: resolve file-image icon for uppercase extensions and AVIF
Compare extensions case-insensitively via strtolower() and include avif in the image list.
1 parent 484a70a commit 4204621

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

inc/Helpers/Misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function get_accessible_file_size_label( string $file_size ): string {
115115
function get_file_icon( string $file_ext ): string {
116116
$file_icon = 'file';
117117

118-
if ( in_array( $file_ext, [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'bmp', 'ico' ], true ) ) {
118+
if ( in_array( strtolower( $file_ext ), [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'avif', 'svg', 'bmp', 'ico' ], true ) ) {
119119
$file_icon = 'file-image';
120120
}
121121

0 commit comments

Comments
 (0)