ascorbic / unpic

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

Proposal : add an option to opt out of automated url delegation #119

Open gbouteiller opened 6 months ago

gbouteiller commented 6 months ago

Hello, I would like to do the following :

For this to happen, an option should be created to opt out of url delegation. I can make a PR if needed. Thank you

ascorbic commented 6 months ago

I'm trying to work out the scenario here. Can you explain why you'd want to use Vercel to optimize your Imagekit source images?

gbouteiller commented 6 months ago

Yes, of course. Imagekit can be used (like Cloudinary) for image optimization and/or storage. For Imagekit, depending of the plan you choose, you have a number of Gb for your storage and another for the bandwidth. Vercel has its own pricing regarding image optimization. For Cloudinary you have credits that can be either used for bandwidth or storage. It can be interesting to have the possibility to choose which service stores and which service optimizes. A concrete example : you want to stay on the free tier of Cloudinary but you have 25Gb of images (so 25 credits used) and you need some image optimization. So if your website is hosted on Vercel, you can opt out of url delegation to let Vercel manage the optimization while all your Cloudinary credits are used for storage only.

ascorbic commented 6 months ago

OK, got it. This would want to be in the cdn options for the ones in question

gbouteiller commented 6 months ago

@ascorbic So would you prefer to integrate it or do you want me to make a PR?