MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / fetchImage

Method fetchImage

handlers/processing/request_methods.go:69–79  ·  view source on GitHub ↗

fetchImage downloads the source image asynchronously

(
	do imagedata.DownloadOptions,
)

Source from the content-addressed store, hash-verified

67
68// fetchImage downloads the source image asynchronously
69func (r *request) fetchImage(
70 do imagedata.DownloadOptions,
71) (imagedata.ImageData, http.Header, errctx.Error) {
72 data, h, err := r.ImageDataFactory().DownloadAsync(
73 r.req.Context(),
74 r.imageURL,
75 "source image",
76 do,
77 )
78 return data, h, r.wrapDownloadingErr(err)
79}
80
81// handleDownloadError replaces the image data with fallback image if needed
82func (r *request) handleDownloadError(

Callers 1

executeMethod · 0.95

Calls 3

wrapDownloadingErrMethod · 0.95
DownloadAsyncMethod · 0.80
ImageDataFactoryMethod · 0.65

Tested by

no test coverage detected