Image provider for remote public images: RemoteImageProvider #167
-
Currently ImageSharp does not yet include a RemoteImageProvider: an image provider which downloads images from a publicly available remote location. Since I need one I am considering implementing it, and making a pull request for it. Proposed designRemoteImageProvider
RemoteImageResolver
Url formatThe tricky question is whether the remote url should be read from a query param or a path param. Query param: Path param Considerations:
@JimBobSquarePants, @dlemstra: Could you please review this design? Since the functionality is so common, I would expect that it would be fine to include it in ImageSharp.Web directly, right? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I have a working POC, see this gist: https://gist.github.com/marklagendijk/e5fd1934391a515f8c974c87024ed39c Some extra questions:
|
Beta Was this translation helpful? Give feedback.
-
I'm afraid this is not something I want to bring into the core offering. It was a conscious decision not to do so. There's a few reasons:
It would be a mistake attempting to bring something into the codebase that is designed as a catch-all. If someone wants to introduce a new |
Beta Was this translation helpful? Give feedback.
I'm afraid this is not something I want to bring into the core offering. It was a conscious decision not to do so.
There's a few reasons:
HttpClientFactory
which then brings additional configuration complexityIt would be a mistake attempting to bring something into the codebase that is designed as a catch-all. If someone wants to introduce a new
IImageProvider
they can develop and plugin an unlimited collection independently.