Skip to content

Commit

Permalink
MU WPCOM: Support HEIF/HEIC on simple sites (#38188)
Browse files Browse the repository at this point in the history
* MU WPCOM: Support HEIF/HEIC on simple sites

* changelog
  • Loading branch information
arthur791004 authored Jul 4, 2024
1 parent 0b47bec commit c77348a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

MU WPCOM: Allow simple sites to upload the heif images
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ function jetpack_wpcom_add_heif_mimes_to_supported_upload_types( $mimes ) {
if ( ! class_exists( 'Photon_OpenCV' ) ) {
return $mimes;
}
// Only need to modify 'upload_mimes' on Atomic.
if ( defined( 'IS_ATOMIC' ) && IS_ATOMIC ) {
$mimes['heif'] = 'image/heif';
$mimes['heic'] = 'image/heic';
}

$mimes['heif'] = 'image/heif';

// HEIC is supported by default, so maybe we don't need it anymore.
// See https://github.com/WordPress/wordpress-develop/blob/80b7747ef165dd5ed0150003a8c2f957f097609e/src/wp-includes/functions.php#L3416.
$mimes['heic'] = 'image/heic';
return $mimes;
}
add_filter( 'upload_mimes', 'jetpack_wpcom_add_heif_mimes_to_supported_upload_types' );

0 comments on commit c77348a

Please sign in to comment.