ascorbic / unpic

Universal image CDN translator
https://unpic.pics/lib
283 stars 31 forks source link

Feature Request: Support for Self Hosted image manipulation server (Thumbor, Imgproxy, Imaginary) #37

Open imsus opened 1 year ago

imsus commented 1 year ago

Please support the open source alternatives

Thumbor

Website: https://www.thumbor.org/ Github Repo: https://github.com/thumbor/thumbor

Imgproxy

Website: https://imgproxy.net/ Github Repo: https://github.com/imgproxy/imgproxy

Imaginary

Github Repo: https://github.com/h2non/imaginary

ascorbic commented 1 year ago

Yeah, ipx too. What I want to do is introduce a more concept of a fallback transformer, which only handles transforms if it doesn't match a CDN transformer. I can take a lot of the logic out of the Vercel transformer. That would make it a lot easier to implement these.

lilith commented 1 year ago

I'd also like to suggest my self-hosted OSS image servers Imageflow and ImageResizer; both have the same querystring command syntax.

https://docs.imageflow.io/querystring/introduction.html https://github.com/riapi/riapi https://github.com/imazen/imageflow https://github.com/imazen/imageflow-dotnet-server https://github.com/imazen/resizer

rajeshg commented 1 year ago

+1 for imaginary.

Here is their API https://github.com/h2non/imaginary#http-api

kdevan commented 1 year ago

I'm thinking about writing a transformer for Imaginary. I've looked at some of the other transformers to get a feel for it. I wonder if you have any advice for how this process might look, since it will be using a custom domain and then going from unpic -> unpic-img which is my goal here.

ascorbic commented 1 year ago

The trouble with most of these is that they use signed URLs, which we can't support

sahidrahman404 commented 1 year ago

The trouble with most of these is that they use signed URLs, which we can't support

can we expose a function to fetch signed URLs from the backend

ascorbic commented 1 year ago

You'd not be able to do that if you ever wanted to use this in the client, e.g. if you're using unpic-img

ascorbic commented 10 months ago

I have implemented support for ipx. If anyone would like to add support for other self-hosted servers then I would suggest using that as an example

anthonyholmes commented 4 months ago

Would you be open to adding support for imgproxy with unsigned URLs? It seems like setting the allowed sources can act as security measure and unpic could add the disclaimer it only works with unsigned URLs https://docs.imgproxy.net/configuration/options#IMGPROXY_ALLOWED_SOURCES

ascorbic commented 4 months ago

Absolutely! Please do. I'd need an example host for the tests though.

anthonyholmes commented 4 months ago

I can send you a couple links from my server unless you think that's a terrible idea

ascorbic commented 4 months ago

That should be fine. You can add that as part of the PR if that's ok