-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add image output formats and interlace settings to REST API client #74908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/client-side-media-dev
Are you sure you want to change the base?
Add image output formats and interlace settings to REST API client #74908
Conversation
Adds image_sizes and image_size_threshold to the root endpoint preload paths to prevent an extra API request in the block editor. This fixes the "Should make no requests before the iframe is loaded" e2e test. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Expose image_output_formats, jpeg_interlaced, png_interlaced, and gif_interlaced settings from the REST API to the client-side media processing pipeline. These settings allow the client to respect server-side image_editor_output_format filter configurations and progressive/interlaced encoding preferences. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d39b171 to
b15f1cc
Compare
63e8707 to
8383b9c
Compare
|
Size Change: +159 B (+0.01%) Total Size: 3.1 MB
ℹ️ View Unchanged
|
…for-media-settings
…for-media-settings
Adds image_sizes and image_size_threshold to the root endpoint preload paths to prevent an extra API request in the block editor. This fixes the "Should make no requests before the iframe is loaded" e2e test. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Expose image_output_formats, jpeg_interlaced, png_interlaced, and gif_interlaced settings from the REST API to the client-side media processing pipeline. These settings allow the client to respect server-side image_editor_output_format filter configurations and progressive/interlaced encoding preferences. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Flaky tests detected in d161775. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/21308481781
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR extends the REST API integration for client-side media processing by adding image output format mapping and interlace settings. These settings were previously only available through editor settings and are now being migrated to the REST API as part of the ongoing media processing infrastructure improvements.
Changes:
- Added TypeScript type definitions for
imageOutputFormats,jpegInterlaced,pngInterlaced, andgifInterlacedto the upload-media store Settings interface - Updated the editor provider to fetch the new settings from the REST API's
__unstableBaseendpoint and pass them through to block editor settings - Modified the block-editor provider to include the new settings in the media upload configuration
- Added PHP unit tests to verify the
gutenberg_get_default_image_output_formats()function behavior with and without filters
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| phpunit/experimental/media/media-processing-test.php | Adds unit tests for gutenberg_get_default_image_output_formats() function to verify default behavior and filter integration |
| packages/upload-media/src/store/types.ts | Extends Settings interface with new image processing configuration fields including output formats and interlace settings |
| packages/editor/src/components/provider/use-block-editor-settings.js | Retrieves new image processing settings from REST API and includes them in block editor settings |
| packages/block-editor/src/components/provider/use-media-upload-settings.js | Passes through the new image processing settings to the media upload configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@adamsilverstein needs refresh ? |
Summary
image_output_formats,jpeg_interlaced,png_interlaced, andgif_interlacedsettings from the REST API to the client-side media processing pipelinegutenberg_get_default_image_output_formats()functionTest plan
image_output_formats,jpeg_interlaced,png_interlaced, andgif_interlacedwhen logged in as an adminnpm run test:unit:php -- --filter="Media_Processing_Test"Closes #74361
🤖 Generated with Claude Code