Any selfhost image proxy optimization? reddit / selfhosted ---------------------------------------------------------------------- Royal-Stunning · 2023-12-10 17:12 Looking for something similar to imgix but selfhosted. My use cases would be something like this \[image.png\]([https://postimg.cc/dhmy9J53](https://postimg.cc/dhmy9J5 3)) so we just need to append our app domain in front of the public image and modification/optimization on the fly with parameters. ---------------------------------------------------------------------- thekrautboy · 2023-12-10 18:23 Very simple to make yourself with imagemagick. ---------------------------------------------------------------------- cardyet · 2023-12-10 18:49 Imgproxy ---------------------------------------------------------------------- Royal-Stunning · 2023-12-10 19:07 yeah, looks like similar with what I need, will poke around when I have the time. ---------------------------------------------------------------------- willnorris · 2023-12-10 19:25 I wrote https://github.com/willnorris/imageproxy for exactly this purpose about 10 years ago. It's just been a personal project, but handful of folks have used it over the years. As mentioned below, imgproxy.net is the other pretty popular option, also written in go. Notably, it's backed by Evil Martians (makers of postcss and a bunch of other things), so is a bit more robust, and has gotten a lot more real-world usage and large scales. They use libvips for image processing, so is a lot more performant. For my imageproxy project, I opted to stick to pure Go libraries, so it's a bit slower, and doesn't currently support webp output. But I've found sticking to go libraries makes it easier to build and deploy; for example, I currently use it on my personal website as a plugin [compiled directly](https://github.com/willnorris/willnorris.co m/blob/main/cmd/caddy/caddy.go) into my Caddy webserver. Another big difference is that imageproxy has built-in caching, whereas imgproxy (the last time I looked) kept that out of scope, arguing that caching should happen at a separate layer. Just different focuses for different projects. :shrug: For large deployments, I'd definitely recommend imgproxy. For small things, or where pure go is important, imageproxy might be useful. ---------------------------------------------------------------------- zaherg · 2023-12-10 19:26 There are many, one of them https://github.com/flyimg/flyimg ---------------------------------------------------------------------- lemniskegg · 2023-12-10 19:52 I use Thumbor in a production system, I package thumbor in a docker image and put nginx inside it for caching ---------------------------------------------------------------------- catbrane · 2023-12-12 14:42 Yet another option is wesrv: https://github.com/weserv/images It's the source code for this site: https://wsrv.nl/ But you can host it yourself somewhere. It's all free, extremely fast, well-documented, and proven at scale. ---------------------------------------------------------------------- Royal-Stunning · 2023-12-13 04:18 Thanks, I already use imgproxy