Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,21 @@ function process_media( $url, $post_id, $args = [] ) {
*
* @return {array} Media extensions to be processed.
*/
$allowed_extensions = apply_filters( 'dt_allowed_media_extensions', array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ), $url, $post_id );
$allowed_extensions = apply_filters(
'dt_allowed_media_extensions',
array(
'jpg',
'jpeg',
'jpe',
'gif',
'png',
'webp',
'heic',
'avif',
),
$url,
$post_id
);
preg_match( '/[^\?]+\.(' . implode( '|', $allowed_extensions ) . ')\b/i', $url, $matches );
if ( ! $matches ) {
$media_name = null;
Expand Down
Loading
Loading