imageproxy icon indicating copy to clipboard operation
imageproxy copied to clipboard

[question] is it possible to create alias for remote url

Open tuananh opened this issue 7 years ago • 6 comments

eg: instead of this

http://localhost:8080/500/https://octodex.github.com/images/codercat.jpg

we can create alias like octo and url will become this

http://localhost:8080/500/octo/images/codercat.jpg

Would you accept a PR for such feature? I'm not familiar with Go but I could give a try if you can point me to where to look at.

tuananh avatar Nov 15 '17 01:11 tuananh

Given the existing baseURL support, this seems to be of somewhat limited value at the cost of additional complexity. So no, probably not something is out in core right now. Maybe as a future plugin?

willnorris avatar Mar 23 '19 05:03 willnorris

@willnorris - I'm trying to proxy images from a third-party partner which are blocked by adblockers because the URL has ads in it. Those images are not ads, it's a poorly chosen name by the partner. I'm looking for a proxying/cache solution for URL rewriting or masking, so this would be a useful feature for instance.

Do you have any other option to achieve that ? Thanks !

kofronpi avatar Mar 30 '19 12:03 kofronpi

reopening issue, as I have some ideas for how to implement aliases without too much complexity.

willnorris avatar Mar 30 '19 15:03 willnorris

alias would be great for multiple baseURL for now we have to run several instances with different baseURL.

maddocnc avatar Jul 31 '19 14:07 maddocnc

@willnorris Any news on the issue?

AlexGustafsson avatar Aug 11 '19 19:08 AlexGustafsson

If you're using a proxy or caching server, you could potentially use rewriting rules to accomplish this. I'm doing this using IIS as a reverse-proxy to ImageProxy, and then a CDN service above that for distribution and additional caching. "https://yourdomain.com/500x,q75/yourwebsite/image.jpg" becomes "http://localhost:8080/500x,q75/https://www.yourwebsite.com/image.jpg"

sunstarjeff avatar Jul 29 '20 06:07 sunstarjeff