Skip to content

Commit

Permalink
Add support for WebP, HEIC, and AVIF
Browse files Browse the repository at this point in the history
  • Loading branch information
benlk committed Sep 8, 2024
1 parent ff40a44 commit 4a43d55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,10 @@ function process_media( $url, $post_id, $args = [] ) {
'jpeg',
'jpe',
'gif',
'png'
'png',
'webp',
'heic',
'avif',
),
$url,
$post_id
Expand Down
3 changes: 3 additions & 0 deletions tests/php/includes/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ function get_allowed_mime_types() {
'bmp' => 'image/bmp',
'tif|tiff' => 'image/tiff',
'ico' => 'image/x-icon',
'webp' => 'image/webp',
'heic' => 'image/heic',
'avif' => 'image/avif',
];
}

Expand Down

0 comments on commit 4a43d55

Please sign in to comment.