🧩 Feature Request: Option to Avoid Blob Creation in decodeImage for Referenced Images
Context
We’re using Rive in an environment with strict Content Security Policy (CSP) that only allows static assets (img-src 'self' data:).
We successfully worked around all issues with rive.wasm, runtime loading, and static hosting — but we’re hitting one final blocker with image assets.
Problem
Even when an image is marked as "prevent export" + "referenced", the exported .riv file still seems to trigger a blob-based decoding through the internal decodeImage function.
This results in CSP errors like:
Refused to load the image 'blob:https://...' because it violates the following Content Security Policy directive: "img-src 'self' data:".
SVGs work fine since they don’t require blob creation, but raster images fail.
What We Need
A way to bypass blob creation entirely at runtime for example, by allowing decodeImage to accept an external image source directly (without converting it to a blob).
Proposed Solution
Add an option or flag to skip blob generation in decodeImage when loading referenced images.
Allow direct assignment of HTMLImageElement or ImageBitmap to the Rive runtime without blob decoding.
Benefits
Full CSP compliance for static-only environments.
No need for unsafe blob: or relaxed CSP policies.
Keeps Rive compatible with locked-down environments such as webviews, embedded widgets, or CSP-restricted platforms.
Thanks a lot for considering this — it would make Rive much more CSP-friendly and easier to integrate in secure environments!