The Image Displays but Canvas Export Fails? Check Cross-Origin Tainting
A visible image and an origin-clean canvas are different conditions. Trace the real SecurityError, input origins and CORS loading path.


A remote image displays in a page, but exporting the canvas fails. Preserve the actual exception and load path first. Visibility and a successful request do not establish permission to read its pixels.
Display is not permission to read back
The MDN cross-origin canvas guide explains that drawing foreign content without CORS approval taints the canvas. Pixel readback and exports such as toBlob or toDataURL can then throw SecurityError.
This concerns integrations using canvas, not an assertion about Tooliva's internal remote-loading path or a reported fault in its current tools.
Separate an exception from an export result
The toBlob reference describes SecurityError separately from a null callback when an image cannot be created. Retain the branch actually observed rather than labeling every failure an oversized file.
If a valid Blob has an unexpected format, use the separate actual export-format checklist. Fallback, null and cross-origin errors need different evidence.
Trace every drawn source
- Record the page origin and actual image origin after redirects without logging signed tokens.
- Inspect the real CORS load setting and response permission; HTTP 200 alone is insufficient.
- List images, video frames and other canvases drawn into this canvas, locating the first incompatible input.
- Have the resource and site owners correct the permitted loading path in a controlled copy, then rebuild from clean inputs and verify export.
Client settings and server permission must agree. Adding one property does not authorize every remote resource. Do not disable browser protection or broadly expand credential access as a repair.
Use a controlled file without conflating implementations
Keep a local source already available to you and prepare a delivery copy through the Resource Compression tool's normal file workflow. This comparison does not validate the original remote CORS path or promise a remote-URL import control.
No cross-origin configuration or export experiment was performed here. Retain sources, the real exception, changed conditions and output, then check encoding, dimensions and appearance separately.
Ready to try "The Image Displays but Canvas Export Fails? Check Cross-Origin Tainting"?
Use our online tools to apply this tutorial to your indie game project right away.
