Skip to content

Commit b128a13

Browse files
committed
Disable client-side media processing in Firefox by default
1 parent f041be2 commit b128a13

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/wp-includes/media.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6365,20 +6365,25 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) {
63656365
*
63666366
* Client-side media processing uses the browser's capabilities to handle
63676367
* tasks like image resizing and compression before uploading to the server.
6368+
* This is currently disabled in Firefox by default since it does not yet
6369+
* {@link https://bugzilla.mozilla.org/show_bug.cgi?id=1863531 support}
6370+
* credentialless iframes.
63686371
*
63696372
* @since 7.0.0
63706373
*
63716374
* @return bool Whether client-side media processing is enabled.
63726375
*/
63736376
function wp_is_client_side_media_processing_enabled(): bool {
6377+
$enabled = ! str_contains( $_SERVER['HTTP_USER_AGENT'] ?? '', 'Firefox' );
6378+
63746379
/**
63756380
* Filters whether client-side media processing is enabled.
63766381
*
63776382
* @since 7.0.0
63786383
*
63796384
* @param bool $enabled Whether client-side media processing is enabled. Default true.
63806385
*/
6381-
return (bool) apply_filters( 'wp_client_side_media_processing_enabled', true );
6386+
return (bool) apply_filters( 'wp_client_side_media_processing_enabled', $enabled );
63826387
}
63836388

63846389
/**

0 commit comments

Comments
 (0)