Skip to content

Support Custom HTTP Headers for Network Image Requests #2184

@sharjeelyunus

Description

@sharjeelyunus

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions