Currently, when loading images from a network source, only a URL can be provided. However, many image endpoints require custom HTTP headers (e.g., Authorization, Cookie, or API keys) to successfully fetch the resource.
This limitation prevents loading images from secured or authenticated sources.
Problem
- Only URL-based image loading is supported.
- No way to attach headers to the request.
- Fails for protected resources (e.g., private CDN, auth-based image services).
Proposed Solution
Introduce support for passing custom HTTP headers in network image requests.
Example:
Image:
source: https://example.com/image.png
headers:
Authorization: Bearer <token>
X-Custom-Header: value
Use Cases
- Loading images from private CDN (e.g., Cloudflare R2 with auth)
- Signed or session-based image endpoints
- Enterprise/internal image services
Currently, when loading images from a network source, only a URL can be provided. However, many image endpoints require custom HTTP headers (e.g.,
Authorization,Cookie, or API keys) to successfully fetch the resource.This limitation prevents loading images from secured or authenticated sources.
Problem
Proposed Solution
Introduce support for passing custom HTTP headers in network image requests.
Example:
Use Cases