1
Fork 0

Add support for GIF images (#1024)

This commit is contained in:
Jorilx 2024-08-20 22:41:30 +02:00 committed by GitHub
parent 5438fbb3f4
commit bef9e7c666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const (
TypeWebp MediaType = "image/webp" TypeWebp MediaType = "image/webp"
TypeBmp MediaType = "image/bmp" TypeBmp MediaType = "image/bmp"
TypeHeic MediaType = "image/heic" TypeHeic MediaType = "image/heic"
TypeGif MediaType = "image/gif"
// Raw formats // Raw formats
TypeDNG MediaType = "image/x-adobe-dng" TypeDNG MediaType = "image/x-adobe-dng"
@ -78,6 +79,7 @@ var SupportedMimetypes = [...]MediaType{
TypeWebp, TypeWebp,
TypeBmp, TypeBmp,
TypeHeic, TypeHeic,
TypeGif,
} }
var WebMimetypes = [...]MediaType{ var WebMimetypes = [...]MediaType{
@ -85,6 +87,7 @@ var WebMimetypes = [...]MediaType{
TypePng, TypePng,
TypeWebp, TypeWebp,
TypeBmp, TypeBmp,
TypeGif,
} }
var RawMimeTypes = [...]MediaType{ var RawMimeTypes = [...]MediaType{
@ -152,6 +155,7 @@ var fileExtensions = map[string]MediaType{
".tiff": TypeTiff, ".tiff": TypeTiff,
".bmp": TypeBmp, ".bmp": TypeBmp,
".heic": TypeHeic, ".heic": TypeHeic,
".gif": TypeGif,
// RAW formats // RAW formats
".dng": TypeDNG, ".dng": TypeDNG,