Skip to content

โœ… ๐Ÿš€ Add support for Document-Isolation-Policy (DIP) so Elementor users can use WordPress 7.1 client-side mediaย #35975

Closed

Description

@adamsilverstein

What problem is your feature request going to solve?

WordPress 7.1 ships client-side media processing as a core feature. Client-side media uses a wasm-vips worker to decode/encode/resize media in the browser, which requires SharedArrayBuffer, which in turn requires the page to be cross-origin isolated.

WordPress 7.0 introduced cross-origin isolation on the block editor via Cross-Origin-Embedder-Policy / Cross-Origin-Opener-Policy (COEP/COOP). Because COEP/COOP broke many third-party iframes, core switched (for 7.1) to Document-Isolation-Policy: isolate-and-credentialless (DIP), a per-document isolation mechanism in Chromium 137+ that does not require server-wide COOP/COEP configuration.

Elementor is incompatible with this isolation. When the Elementor editor loads with DIP applied to the parent document, the editor throws:

Uncaught SecurityError: Failed to read a named property 'elementorFrontend' from 'Window':
Blocked a frame with origin "https://example.com" from accessing a cross-origin frame.
    at Editor.onPreviewLoaded (editor.min.js:...)

(Reproduction reported on Elementor 3.34.4 against WordPress 7.0-beta3 by the Elementor team in this thread.)

Root cause

From the Chrome DIP documentation:

Iframes isolated with Document Isolation Policy don't have synchronous DOM access to same-origin iframes that are not isolated.

DIP places the isolated document in its own agent cluster. Elementor's editor is built on a pattern where the main editor frame (post.php?action=elementor) reaches synchronously into the same-origin preview <iframe> via iframe.contentWindow.elementorFrontend.*. With DIP applied to the editor frame but not to the preview iframe, that direct cross-frame property access is blocked by the browser's same-agent-cluster rule, even though both documents are same-origin.

Current state - workarounds, not fixes

Two workarounds are in place today, but they prevent Elementor users from getting client-side media at all:

  1. WordPress core (7.1) - Skips sending DIP headers when a third-party page builder is detected via a non-edit action query parameter (WordPress/wordpress-develop#11170, part of the broader #11098 DIP work).
  2. Elementor 3.35 - Registers a replace_editor filter that signals to core that Elementor is replacing the block editor, so core skips DIP on Elementor screens (elementor/elementor#34900).

Net effect: any user editing with Elementor never receives the DIP header, so crossOriginIsolated is false, so SharedArrayBuffer is unavailable, so the wasm-vips client-side media pipeline is silently disabled. Elementor users fall back to server-side media processing and miss out on:

  • Client-side HEIC decoding (iPhone photos) without server libraries
  • Client-side AVIF/WebP encoding
  • Browser-side sub-size generation, EXIF handling, auto-rotation
  • Ultra HDR (ISO 21496-1) gain-map preservation
  • Resilient/retryable uploads, progress UI improvements
  • Future capabilities gated on crossOriginIsolated: WebAssembly threading, WebCodecs with shared memory, high-resolution timers, real-time collaboration primitives, etc.

Describe the solution you'd like

Make Elementor compatible with Document-Isolation-Policy: isolate-and-credentialless on the editor screen so the replace_editor opt-out can eventually be removed and Elementor users get the same media (and future) capabilities as block-editor users.

Two non-exclusive approaches, each documented in the Chrome DIP guide:

Option 1 - Apply DIP to the preview iframe as well

If both the parent editor document and the preview iframe send the same DIP header, they share an agent cluster and synchronous DOM access is restored.

Sketch:

  • Emit Document-Isolation-Policy: isolate-and-credentialless on the Elementor preview response (the URL loaded inside the editor preview <iframe>).
  • Audit subresources in the preview (images, fonts, embedded third-party widgets, etc.). With isolate-and-credentialless, cross-origin no-CORS subresources are loaded without credentials and don't need CORP, which is much less invasive than COEP require-corp - but any iframe inside the preview that also needs DOM access will need DIP as well.
  • DIP is gated on a secure context (HTTPS or localhost). Testing must be over HTTPS.

This is the lowest-effort path: it preserves Elementor's existing parent โ†” preview DOM-access pattern.

Option 2 - Replace synchronous cross-frame property access with postMessage

window.postMessage() works across DIP isolation boundaries and across origins. Refactoring the editor โ†” preview channel to message-passing makes Elementor portable across isolation modes (DIP, future origin-keyed agent clusters, cross-origin previews, etc.) and avoids the "both frames must opt in" constraint.

This is a larger refactor but is the architecturally durable answer and would also help with adjacent compatibility work (e.g. moving previews to a sandboxed/cross-origin frame in the future).

Coordination

The WordPress core media team is happy to help test, review, and co-design. Ping @adamsilverstein / @westonruter on any draft PR. Once Elementor supports DIP, the replace_editor opt-out from elementor/elementor#34900 can be removed, and the matching core workaround in WordPress/wordpress-develop#11170 can be revisited.

References

WordPress core / Gutenberg:

Elementor:

Web platform:

Activity

  1. added
    request/enhancementIndicates an Enhancement Request for an existing feature.
    status/has-prIndicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.
    mod*[Temp.] For internal use only.
    mod/e*[Temp.] For internal use only.
    compatibility/wordpress-editorIndicates a compatibility problem with the WordPress Block or Classic editors.
    mod/r*[Temp.] For internal use only.
    status/evaluatingIndicates when an Issue or Discussion is under evaluation or analysis.
    component/codeIndicates when a topic is related to a componentโ€™s code.
    control/mediaReferences the Media chooser settings control.
    on May 21, 2026
  2. nicholaszein commented on May 21, 2026

    @nicholaszein
    Member

    Hi @adamsilverstein,

    Thank you for sharing this issue and PR. We really appreciate it. ๐Ÿ™

    Miriam already escalated it to the team.

    Please note, in the future, if possible, identify yourself here or in the PR so we can ensure to give your PR priority and avoid flagging your issue incorrectly. I almost closed your issue since we handle feature requests in Discussions. ๐Ÿ˜…

    All good though. We're on it! ๐Ÿ’ช

    Regards

  3. changed the title [-]Add support for Document-Isolation-Policy (DIP) so Elementor users can use WordPress 7.1 client-side media[/-] [+]๐Ÿš€ Add support for Document-Isolation-Policy (DIP) so Elementor users can use WordPress 7.1 client-side media[/+] on May 21, 2026
  4. adamsilverstein commented on May 21, 2026

    @adamsilverstein
    ContributorAuthor
  5. changed the title [-]๐Ÿš€ Add support for Document-Isolation-Policy (DIP) so Elementor users can use WordPress 7.1 client-side media[/-] [+]โœ… ๐Ÿš€ Add support for Document-Isolation-Policy (DIP) so Elementor users can use WordPress 7.1 client-side media[/+] on May 23, 2026
  6. added
    status/mergedIndicates when a Pull Request has been merged to a Release.
    solvedIndicates that an Issue has been Solved, or a Feature Request has been Released.
    mod/s*[Temp.] For internal use only.
    mod/vf*[Temp.] For internal use only.
    and removed
    mod/e*[Temp.] For internal use only.
    status/evaluatingIndicates when an Issue or Discussion is under evaluation or analysis.
    on May 23, 2026
  7. gregbenz commented on Aug 19, 2026

    @gregbenz

    Under WordPress v7.1 and Elementor 4.2.3 / Elementor Pro 4.2.2, there is no HDR in the transcoded images. I assume this is expected and dependent on the v7.2 enhancements coming later.

    It is confusing though as Elementor is often showing a resized full-size image when you select a lower res (such as thumb or 300x300) image, which results in seeing an HDR image that likely won't appear when the post/page is deployed.

    I did not see an error on the page or in the console, so it safely shows legacy (SDR-only) results even if HDR is not supported.

    Note on a separate finding, the Medium Large size dropdown in Elementor shows an invalid 768x0 size (source was 1080x1080). All other sizes show valid dimensions for both height and width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility/wordpress-editorIndicates a compatibility problem with the WordPress Block or Classic editors.component/codeIndicates when a topic is related to a componentโ€™s code.control/mediaReferences the Media chooser settings control.mod*[Temp.] For internal use only.mod/r*[Temp.] For internal use only.mod/s*[Temp.] For internal use only.mod/vf*[Temp.] For internal use only.request/enhancementIndicates an Enhancement Request for an existing feature.solvedIndicates that an Issue has been Solved, or a Feature Request has been Released.status/has-prIndicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions