Media: Make client-side supported MIME types configurable#11277
Media: Make client-side supported MIME types configurable#11277adamsilverstein wants to merge 1 commit intoWordPress:trunkfrom
Conversation
Add a `client_side_supported_mime_types` filter and REST API index field so plugins can customize which image formats are processed client-side via WebAssembly-based vips. The default list includes JPEG, PNG, GIF, WebP, and AVIF. Also updates the preload paths in the post editor and site editor to include the new field, ensuring the preloaded URL matches the JavaScript request. Props adamsilverstein. See WordPress/gutenberg#76549.
|
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. |
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. |
Summary
Add a
client_side_supported_mime_typesfilter and REST API index field so plugins can customize which image formats are processed client-side via WebAssembly-based vips.client_side_supported_mime_typesfilter with default list:image/jpeg,image/png,image/gif,image/webp,image/avifupload_filescapability)Changes
src/wp-includes/rest-api/class-wp-rest-server.php— Add filter and REST index fieldsrc/wp-admin/edit-form-blocks.php— Add field to preload pathssrc/wp-admin/site-editor.php— Add field to preload pathstests/qunit/fixtures/wp-api-generated.js— Update test fixtureRelated
Trac ticket: https://core.trac.wordpress.org/ticket/64876