COEP blocks an image that opens correctly in a separate tab
Diagnose images blocked by Cross-Origin-Embedder-Policy, compare document and resource headers, and repair the embedding contract while preserving isolation.
By Crawlito · 6 min read
In short
- A resource can load directly while its use inside a document is blocked by COEP.
- The document's embedder policy and the resource's permission are separate settings.
- Choose an appropriate CORP or CORS path for intended public assets and verify the real embedding context.
On this page
- Identify the blocked resource in its page context
- Inspect the document and resource headers separately
- Decide what embedding the asset is meant to permit
- Repair the intended request mode and resource response
- Verify the public page after caches refresh
- Keep crawler conclusions tied to the observed client
- Prevent unrelated header changes from recreating the defect
- Frequently asked questions
If an image opens in a separate tab but disappears inside your page after a header change, inspect Cross-Origin-Embedder-Policy on the document. A require-corp policy can block a cross-origin resource that has not opted into the applicable embedding path. Compare the document and image responses, then repair that relationship without blindly removing the site's isolation policy.
This is a browser embedding problem. A successful direct image download does not test it, and a generic “image returned 200” report can miss the reason readers see an empty frame.
Identify the blocked resource in its page context
Open the affected page with Console and Network panels visible. Record the image URL, the embedding element, the browser's blocking message, and the document response headers.
Confirm that the error refers to COEP or its related resource-policy check. A 404, invalid image file, mixed-content block, or ordinary CORS error may require a different diagnosis.
MDN's COEP reference describes the document policy and how resources can satisfy it.
Capture the actual final resource URL if the image redirects. The policy decision concerns the delivered resource path, not just the first address stored in the CMS.
Also identify what the image communicates. A missing product photograph or instructional diagram deserves different handling from a purely decorative asset.
The image accessibility guide can help retain meaningful text alternatives while the delivery issue is repaired.
Inspect the document and resource headers separately
Save a normal document response and a response from the affected image:
curl -sS -D page-headers.txt -o page.html \
'https://www.example.com/guides/setup'
curl -sS -D image-headers.txt -o diagram.png \
'https://assets.example.net/diagrams/setup.png'These requests establish what each endpoint returns. They do not enforce the browser's embedding rules.
Check whether the document sets require-corp and whether the image has an appropriate Cross-Origin-Resource-Policy header or a supported CORS path.
Keep the two roles clear. Adding an embedder policy to the image response is not the same as granting the permission the document needs to embed it.
Inspect the image element's request configuration as well. The browser's request mode matters, so merely observing an Access-Control-Allow-Origin header is not a complete test.
Record any CDN rule that changes these headers. A correct storage-object setting may be overridden or cached at the public delivery layer.
Decide what embedding the asset is meant to permit
Identify the resource owner and intended audience before changing policy. A public illustration meant for a public documentation site is different from a private account image.
For a public cross-origin asset, an appropriate CORP response or a correctly configured CORS request can support the intended embedding. Use the narrow policy that matches the real trust boundary.
Do not set permissive headers on all private resources simply because one public diagram needs to load. Review the affected asset path or service rather than expanding unrelated access.
If you do not control the resource host, ask whether it supports the needed embedding contract. A direct link may be usable even when embedding is unsupported.
Avoid creating an unrestricted proxy that fetches arbitrary URLs to work around the error. If your architecture needs an asset proxy, it needs its own bounded input and authorization design.
The CORS guide explains why browser-readable access and a raw server fetch should be evaluated separately.
Repair the intended request mode and resource response
For a deliberately public resource, configure the asset service's supported policy and the embedding element consistently. Do not apply a header example without confirming which request mode the page uses.
MDN documents that require-corp can work with an appropriate resource policy for no-cors requests, or with a permitted CORS request. Those are related but distinct paths.
If choosing the CORS path, verify the element requests that mode and that the resource server authorizes it. Test the actual page rather than relying on a direct asset URL.
If choosing a resource-policy path, publish the intended header on the actual final asset response. A redirecting URL and its destination may be controlled by different systems.
Changing to credentialless is not an interchangeable shortcut: it changes credential behavior for applicable requests. Assess that consequence before considering it for a resource that depends on cookies.
Retain the feature that motivated cross-origin isolation, and test it after the change. A repair should not silently disable a required browser capability elsewhere in the application.
Verify the public page after caches refresh
Reload the affected page through its ordinary public address. Confirm that the image is displayed and that the original policy error is absent.
Inspect the public resource headers again. A configuration console showing the desired value does not prove an edge cache serves it yet.
Test the same page with an additional representative asset from the affected host. A header rule can match one filename extension or folder while missing another.
Include a direct entry and a navigation within the application if they load assets differently. Capture the final URL selected by responsive or generated image logic.
The image CDN discovery guide addresses the separate question of whether public image addresses are discoverable and fetchable. Successful browser embedding alone does not settle that question.
Preserve any legitimate private-resource restrictions as a control. The acceptance plan should show that the intended public asset works without broadening access to unrelated material.
Keep crawler conclusions tied to the observed client
A browser renderer may encounter the same embedding policy while a plain HTTP fetcher merely downloads the document or image. Do not assume all AI crawlers use the same execution environment.
Report what you verified: a specific document policy blocked a specific embedded resource, and the repaired public page now displays it under the supported policy.
If the image contains essential instructions, provide equivalent explanatory text in the page. This improves the reader's experience even when an image fails for another reason.
Do not infer search visibility from the presence or absence of one browser error. Image discovery, content relevance, indexing, and the platform's display decisions remain separate.
For a client report, include the document URL, image URL, responsible header owner, before message, and after observation. This makes the issue actionable without attributing it to robots.txt or a crawler identity that was never tested.
Prevent unrelated header changes from recreating the defect
Add representative embedded assets to the acceptance checklist for security-header releases. Include a public image, any supported cross-origin script, and the feature that requires isolation.
Keep an inventory of third-party asset hosts that the page depends on. A provider migration can change the resource policy even when the HTML element remains identical.
Test the actual production delivery route in addition to a local development server. Local same-origin assets may never exercise the cross-origin boundary that fails publicly.
Document why the chosen policy is appropriate. A later developer should know whether an asset is intentionally shareable, same-site only, or private.
When an asset service changes ownership or authentication requirements, revisit the embedding contract explicitly. A formerly public image is not automatically safe to expose under the old response headers.
Frequently asked questions
Why does the image open directly but fail inside the page?
Direct navigation and embedding are different contexts. The document's policy can restrict embedded use even when the asset endpoint returns a valid image.
Does adding a CORS header always fix COEP?
No. The request mode and permission must work together. Inspect the element and the final resource response under the documented policy.
Should I remove COEP from the whole website?
First identify why it was enabled and which feature depends on it. Repair the specific resource relationship or make an intentional architectural change with the responsible owner.
After the browser embedding test passes, use the free Crawlito check on the public page to review its delivered content and other access signals.
Filed under Rendering and content. Topics: images, security, troubleshooting