Source resolver that streams images from http(s):// URLs.
Decoding is streaming-friendly: the body flows from the socket
into libvips chunk-by-chunk via Image.from_req_stream/2, which
uses Req.get/2 with into: :self and feeds bytes into
Vix.Vips.Image.new_from_enum/1.
Configuration
:allowed_hosts(required) — list of hostname strings the resolver will fetch from. Hosts not on the list are rejected with:invalid_option. Pass:anyto disable the allow-list (only sensible when this resolver sits behind a host-supplied auth/auditing layer).:timeout— milliseconds to wait between chunks. Defaults to5_000(theImage.from_req_stream/2default).
Limitations (v0.1)
The streaming decode path does not surface response headers to the caller, so the resolver cannot populate
:last_modifiedor forward an upstreamETag. Theetag_seedis derived from the request URL itself, which gives a stable per-URL ETag without a second pass over the body. A future milestone may switch to a two-stage HEAD-then-GET when freshness signals are required.Response body size is bounded by whatever limits the configured
Reqrequest honours; we do not impose an additional cap in this resolver.Requires the optional
:reqdependency. IfReqis not loaded the resolver returns:not_implementedat request time.