[wp-trac] [WordPress Trac] #64597: Client Site Media: PHP backports from Gutenberg

WordPress Trac noreply at wordpress.org
Wed Feb 4 22:49:46 UTC 2026


#64597: Client Site Media: PHP backports from Gutenberg
-----------------------------+-----------------------------
 Reporter:  adamsilverstein  |      Owner:  adamsilverstein
     Type:  enhancement      |     Status:  assigned
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Editor           |    Version:  trunk
 Severity:  normal           |   Keywords:  has-patch
  Focuses:                   |
-----------------------------+-----------------------------
 == Description

 This ticket adds REST API index data and preloaded paths for the client-
 side media processing feature being developed in Gutenberg.

 Client-side media processing allows the browser to handle image resizing,
 thumbnail generation, and format conversion using WebAssembly (via the
 vips library), reducing server load and improving upload performance.

 === Changes

 1. **REST API Index** (`WP_REST_Server::get_index()`): Adds media
 processing configuration fields to the REST API root index response for
 users with the `upload_files` capability.

 2. **Preload Paths**: The post editor (`edit-form-blocks.php`) and site
 editor (`site-editor.php`) now preload these fields.

 === New Fields

 The following settings are now available in the REST API index (for
 authorized users) and preloaded in the editors:

 * `image_sizes` - Available image size configurations for thumbnail
 generation
 * `image_size_threshold` - Big image size threshold (default 2560px) for
 automatic scaling of large images
 * `image_output_formats` - Output format mappings for image conversion
 (e.g., JPEG to WebP)
 * `jpeg_interlaced` - Whether to use progressive/interlaced JPEG encoding
 * `png_interlaced` - Whether to use interlaced PNG encoding
 * `gif_interlaced` - Whether to use interlaced GIF encoding

 These preloaded paths prevent additional REST API requests when the editor
 loads, improving performance.

 == Related Gutenberg PRs

 * [#74566 - Create sub-sized
 images](https://github.com/WordPress/gutenberg/pull/74566)
 * [#74908 - Add image output formats and interlace settings to REST API
 client](https://github.com/WordPress/gutenberg/pull/74908)
 * [#75112 - Media: Graduate client-side media processing from
 experimental](https://github.com/WordPress/gutenberg/pull/75112)

 == Tracking Issue

 * [#75062 - Graduate Client Side Media out of
 experiments](https://github.com/WordPress/gutenberg/issues/75062)

 == Testing

 === REST API Index
 1. As an admin user, make a GET request to `/wp-json/` (the REST API root)
 2. Verify the response includes `image_sizes`, `image_size_threshold`,
 `image_output_formats`, `jpeg_interlaced`, `png_interlaced`, and
 `gif_interlaced`
 3. As a subscriber (without `upload_files` capability), verify these
 fields are NOT present

 === Editor Preloading
 1. Open the post editor or site editor
 2. Check the Network tab in browser DevTools
 3. Look for the preloaded `/?_fields=...` request
 4. Verify the response includes the new image settings

 == Patch

 GitHub PR: https://github.com/WordPress/wordpress-develop/pull/XXXXX

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64597>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list