Added webp favicon

This commit is contained in:
Eduard Urbach 2017-06-13 19:39:59 +02:00
parent 7296c08844
commit 07702a598f
4 changed files with 5 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
images/icons/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
images/icons/favicon.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -55,7 +55,11 @@ func main() {
// Favicon
app.Get("/favicon.ico", func(ctx *aero.Context) string {
return ctx.File("images/icons/favicon.ico")
if ctx.CanUseWebP() {
return ctx.File("images/icons/favicon.webp")
}
return ctx.File("images/icons/favicon.png")
})
// Scripts