willnorris / imageproxy

A caching, resizing image proxy written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

avif

gedw99 opened this issue · comments

commented

https://caniuse.com/avif

Would you consider avif worth supporting ?

I know its NOT supported on browsers but it will eventually, and i would like to put it into blue green ops

I'm not opposed to supporting the format, but I imagine it will run into the same problem as webp and HEIC (some of which is discussed in #114 and #292), which is the lack of a native Go library for encoding and decoding. https://github.com/Kagami/go-avif seems to be the main option for Go, and it requires cgo, which I'm avoiding in this project for now.

The one-day, maybe, eventual rearchitecture of imageproxy as described in https://github.com/willnorris/imageproxy/blob/main/docs/plugin-design.md would be the most likely solution for opening up the option for cgo libraries. But as discussed there, I have no immediate plans for that rewrite, and honestly may never get around to it.

In the meantime, it looks like imgproxy (different project, similar name) does have AVIF support, since they use libvips for image encoding/decoding: imgproxy/imgproxy#456. imgproxy requires that you bring your own caching (like putting it behind a CDN), which may or may not be what you're looking for.