Media: Graduate client-side media processing from experimental#75112
Media: Graduate client-side media processing from experimental#75112
Conversation
|
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. |
|
Size Change: +50 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
e0506d9 to
360e915
Compare
With client-side media processing enabled by default, image uploads take longer to complete because they include WASM-based processing via libvips before the actual upload. The previous 10-second default timeout for Playwright assertions was not sufficient. This commit increases the timeout to 30 seconds for assertions that wait for image uploads to complete (checking that the src attribute no longer contains a blob URL and instead contains the uploaded filename). Co-Authored-By: Claude Opus 4.5 <[email protected]>
With client-side media processing, the uploaded filename may be changed by the server during processing. Update the E2E tests to: 1. Check for a valid HTTP URL instead of the specific UUID filename 2. Check that the image block has a valid ID in the content 3. Remove unused fileName variables This is necessary because the upload-media module may rename files during processing (e.g., when the file is a Blob that gets converted to a File with a default name like 'image.png'). Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update cover block test to check for HTTP URL instead of filename (filename may be changed by server during processing) - Add is-transient class wait for image tests that publish posts (ensures thumbnail generation is complete before publish) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add explicit wait for Publish button to be enabled with 30s timeout in image upload tests. This ensures all background processing (thumbnail generation, sideloads) completes before attempting to publish. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Complete the window global rename started in 01c7971 by updating use-upload-save-lock and media-upload utils.
Add test plugin to disable client-side media processing for tests incompatible with cross-origin isolation (COEP/ COOP headers). Update cross-origin isolation tests to expect isolation enabled by default.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add upload-media store queue wait in site editor image upload test to handle async client-side processing completing before checking src - Fix big-image-size-threshold test: make original_image assertion conditional since client-side scaling may not set this metadata (it's a server-side behavior during wp_create_image_subsizes) - Move dimension assertions outside the -scaled suffix check since both client-side and server-side scaling should respect the threshold Co-Authored-By: Claude Opus 4.6 <[email protected]>
…d test Client-side media processing is not yet fully supported in the site editor context — the upload-media store pipeline gets stuck and items never leave the queue. Disable it for this test using the existing test plugin so it can use the traditional server-side upload path. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Move gutenberg_is_client_side_media_processing_enabled() from lib/load.php to lib/compat/wordpress-7.0/media.php per the convention for release-specific features. Rename the filter from gutenberg_ to wp_ prefix for Core migration.
These were development-only helpers that are no longer needed for the graduated client-side media processing feature.
The feature is no longer experimental, so the variable name should reflect its actual purpose.
This JS global is no longer experimental. Moving it to lib/media/load.php which already gates on the feature being enabled.
Rename __experimentalMediaProcessing to __clientSideMediaProcessing in image block edit.js, and remove gutenberg-media-processing from test bootstrap experiments since the feature is now graduated. Co-Authored-By: Claude Opus 4.6 <[email protected]>
COEP headers break TinyMCE iframe initialization, causing the wp-editor meta box E2E test to fail. This matches the fix already applied in the classic block test.
COOP headers cause browsing context replacement during page navigations, breaking Playwright's page reference. This affects template creation and revert tests in both the post editor and site editor.
The call was at the top level of the file, executing during plugin load before enqueue hooks fire. Wrap it in a function hooked to admin_init, matching the pattern in editor-settings.php.
The filter check at file-load time runs before other plugins can register their filters. Re-check at action time so the disable plugin works. Also disable client-side media processing in pattern E2E tests to prevent COEP from breaking page navigations.
|
I triple checked that it has the same failures as trunk. Since this is blocking 7.0 Beta 1, I'm merging this. |
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: b441348 |
|
No urgency but it looks like this PR had a negative impact on "first block load" metrics on both post and site editors. I think we should take some time to investigate this during the beta cycle. |
|
Hey folks, I understand there was a big time pressure on landing this one with the 7.0 feature freeze, but I'm not sure this was ready to land for the Gutenberg plugin just yet as it leaves
I.e. this issue: #75302 There are also more tasks still to be done for gating the feature on low power or low next devices, etc, too: #75605 For 7.0, I believe there's plenty of time to fix these things through the beta period and polish the feature (and then make a call on it around RC time). My main concern is that I don't think it's safe to make client-side media processing the default experience in Gutenberg until those issues are resolved. What do you all think? One option could be (for Gutenberg for now) to set |
I've tried this out in #75756 in case that helps for the GB 22.6 release. |
|
I just cherry-picked this PR to the release/22.6 branch to get it included in the next release: 11d1327 |

Summary
lib/experimental/media/tolib/media/gutenberg_client_side_media_processing_enabledfilter (defaults totrue) allowing sites to disable the feature if neededwindow.__experimentalMediaProcessingtowindow.__clientSideMediaProcessingTest plan
add_filter( 'gutenberg_client_side_media_processing_enabled', '__return_false' );to a pluginCloses #75062