Enables client-side media processing on Firefox and Safari via COEP/COOP cross-origin isolation headers, and adds HEIC/HEIF upload support with automatic client-side conversion to JPEG.
WordPress 7.0 and Gutenberg include client-side media processing powered by WebAssembly (wasm-vips). This requires cross-origin isolation, which is achieved via Document-Isolation-Policy (DIP) on Chrome 137+.
However, Firefox and Safari do not yet support DIP, so client-side media processing is disabled on those browsers.
This plugin restores support by sending the older COEP/COOP headers on browsers where DIP is not available:
- Sends
Cross-Origin-Opener-Policy: same-originandCross-Origin-Embedder-Policy: credentialless(orrequire-corpon Safari) headers in the block editor. - Adds
crossorigin="anonymous"attributes to cross-origin resources. - Adds
credentiallessattribute to iframes so they continue working under COEP. - Filters embed previews for providers that do not support credentialless iframes (Facebook, SmugMug).
HEIC support was removed from WordPress core's wasm-vips build due to LGPL/GPL license incompatibility. This plugin re-enables HEIC upload support by converting images client-side:
- Enabled by default — can be toggled under Settings → Media.
- HEIC/HEIF images are automatically converted to JPEG in the browser before upload.
- Uses the heic2any library, loaded dynamically from an external CDN only when a HEIC file is detected.
- heic2any uses libheif (LGPL-3.0) for decoding. Since it is loaded at runtime from a CDN rather than bundled with the plugin, it is treated as a separate work and does not affect the plugin's GPL-2.0-or-later license.
- WordPress 6.8+ with the Gutenberg plugin, or WordPress 7.0+.
- The client-side media processing feature must be enabled.
- Upload the
client-side-media-experimentsfolder to/wp-content/plugins/. - Activate the plugin through the Plugins menu in WordPress.
- The COEP/COOP headers activate automatically on browsers that need them. HEIC support is enabled by default.
add_filter( 'csme_use_coep_coop', '__return_false' );Navigate to Settings → Media and uncheck HEIC Support, or programmatically:
update_option( 'csme_heic_enabled', 0 );Use the csme_heic_library_url filter to point to your own hosted copy of heic2any:
add_filter( 'csme_heic_library_url', function () {
return 'https://example.com/heic2any.min.js';
} );This plugin is licensed under GPL-2.0-or-later.
The HEIC conversion library (heic2any / libheif) is LGPL-3.0 licensed and loaded at runtime from an external CDN as a separate work.