1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/image_size/svg.go
2019-09-25 21:47:37 +06:00

16 lines
344 B
Go

package imageSize
import (
"io"
)
func init() {
// Register fake svg decoder. Since we need this only for type detecting, we can
// return fake image sizes
decodeMeta := func(io.Reader) (*Meta, error) {
return &Meta{Format: "svg", Width: 1, Height: 1}, nil
}
RegisterFormat("<?xml ", decodeMeta)
RegisterFormat("<svg", decodeMeta)
}