Make WordPress Core


Ignore:
Timestamp:
03/20/2026 05:09:14 PM (3 months ago)
Author:
adamsilverstein
Message:

Media: Remove client-side media processing feature for now.

Punt the wasm-vips client-side media processing feature to a future release when it can include more features. The VIPS WASM worker adds too much build size overhead for the current value provided. Removes all PHP functions, REST API endpoints, cross-origin isolation infrastructure, VIPS script module handling, build configuration, and associated tests.

Props adamsilverstein, jorbin.
Fixes #64906.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r61878 r62081  
    13691369        );
    13701370
    1371         // Add media processing settings for users who can upload files.
    1372         if ( wp_is_client_side_media_processing_enabled() && current_user_can( 'upload_files' ) ) {
    1373             // Image sizes keyed by name for client-side media processing.
    1374             $available['image_sizes'] = array();
    1375             foreach ( wp_get_registered_image_subsizes() as $name => $size ) {
    1376                 $available['image_sizes'][ $name ] = $size;
    1377             }
    1378 
    1379             /** This filter is documented in wp-admin/includes/image.php */
    1380             $available['image_size_threshold'] = (int) apply_filters( 'big_image_size_threshold', 2560, array( 0, 0 ), '', 0 );
    1381 
    1382             // Image output formats.
    1383             $input_formats  = array( 'image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif', 'image/heic' );
    1384             $output_formats = array();
    1385             foreach ( $input_formats as $mime_type ) {
    1386                 /** This filter is documented in wp-includes/media.php */
    1387                 $output_formats = apply_filters( 'image_editor_output_format', $output_formats, '', $mime_type );
    1388             }
    1389             $available['image_output_formats'] = (object) $output_formats;
    1390 
    1391             /** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
    1392             $available['jpeg_interlaced'] = (bool) apply_filters( 'image_save_progressive', false, 'image/jpeg' );
    1393             /** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
    1394             $available['png_interlaced'] = (bool) apply_filters( 'image_save_progressive', false, 'image/png' );
    1395             /** This filter is documented in wp-includes/class-wp-image-editor-gd.php */
    1396             $available['gif_interlaced'] = (bool) apply_filters( 'image_save_progressive', false, 'image/gif' );
    1397         }
    1398 
    13991371        $response = new WP_REST_Response( $available );
    14001372
Note: See TracChangeset for help on using the changeset viewer.