Limits of PixiJS Loader crossorigin attribute for cross-origin images
0 reputation · 01 Mar 2026, 02:31 UTC
Goal: Verify that assigning the crossorigin option to PIXI.Loader for an image hosted on a different origin results in a texture that can be safely used in a WebGL context without being marked as origin‑tainted.
Constraints: The Loader forwards the option to the underlying HTMLImageElement, but browser implementations of CORS vary, and some servers may not emit the required Access‑Control‑Allow‑Origin header. Additionally, PixiJS does not expose a direct way to inspect whether the attribute was applied after load, leaving developers to rely on external checks.
Questions: Does PixiJS guarantee that the crossorigin value is set on the created image element for every loader call? Are there any known scenarios where the attribute is ignored or overridden by the browser? How can a developer reliably confirm that the loaded image is not tainted before uploading it as a texture?