Remove client-side media processing feature#11309
Remove client-side media processing feature#11309adamsilverstein wants to merge 7 commits intoWordPress:trunkfrom
Conversation
Punt the wasm-vips client-side media processing feature to 7.1 as it adds ~16MB of WASM to the build without sufficient value for 7.0. Removes all PHP functions, REST API endpoints (sideload/finalize), cross-origin isolation, VIPS script module handling, and associated tests.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Remove extra blank lines before closing braces in register_routes() and wp_print_media_templates().
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Missed in the initial removal of the client-side media processing feature.
Remove image_sizes, image_size_threshold, image_output_formats, interlaced settings from REST index, and generate_sub_sizes/convert_format params from media create endpoint.
|
I tried to check all of the commits. For the most part, this looks good however I noticed that |
…les. The previous build config only excluded non-minified vips files, but with client-side media processing removed from Core, vips should not be copied or registered at all. This adds: - `!vips/**` exclusion to the Gruntfile copy task - Skip `vips` directory in `generateScriptModulesPackages()` so vips modules are not auto-registered - Update test to assert vips modules are not registered in Core Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
it should be removed now, I left a "test_vips_script_modules_not_registered_in_core" |
WP_Script_Modules::$registered is private with no public getter. Use the same enqueue-and-check-output pattern as the original test to verify vips modules are not registered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build Size Comparison: vips exclusionRelease zip impact
The nightly zip is currently 61 MB vs 27 MB for 6.9.1. Removing vips saves 4 MB in the compressed zip (61 MB -> 57 MB). The remaining ~30 MB increase over 6.9.1 comes from other new packages and features in 7.0. Note: vips is 13 MB uncompressed but compresses to ~4 MB in the zip since the inlined wasm binary is base64-encoded data that still compresses reasonably well. Full build directory (uncompressed)
script-modules/ breakdown
|
The upload-media package in the Gutenberg build artifact declares @wordpress/vips/worker as a dynamic module dependency. Since vips is excluded from Core, this unregistered dependency causes a _doing_it_wrong notice on every admin page load. Filter out @wordpress/vips/* module dependencies during the script-loader-packages.php generation step. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
script-modules/), which is too much build size overhead for the current value providedTrac ticket: https://core.trac.wordpress.org/ticket/64906
What's removed
media.php(client-side media processing, cross-origin isolation, DIP headers)/sideloadand/finalizeendpoints andgenerate_sub_sizes/convert_formatparamsmedia-template.phptools/gutenberg/copy.jswpCrossOriginIsolation.phpand 9 sideload/finalize/generate_sub_sizes testsWhat's preserved (independent features)
wp_prevent_unsupported_mime_type_uploadsfilter (#64836)X-WP-Upload-Attachment-IDheader (error recovery)post-processandeditendpointsexif_orientation,filename,filesize,missing_image_sizesschema propertiesTest plan
phpunit tests/phpunit/tests/media/— verify no failuresphpunit tests/phpunit/tests/rest-api/rest-attachments-controller.php— verify no failuresphpunit tests/phpunit/tests/rest-api/rest-schema-setup.php— verify route list is correctnpx grunt build --dev— verify build succeedsbuild/wp-includes/js/dist/script-modules/vips/no longer exists after buildAI use
I created this PR with careful prompting and planning in Claude Code. I will review the code and test the result.