diff --git a/idicon.go b/idicon.go
index 568d3a6..5f4f966 100644
--- a/idicon.go
+++ b/idicon.go
@@ -7,6 +7,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/gorilla/mux"
"idicon/icons"
+ "image/jpeg"
"image/png"
"log"
"net/http"
@@ -81,6 +82,9 @@ func requestHandler(w http.ResponseWriter, r *http.Request) {
if ct == "svg" || cth == "image/svg+xml" {
w.Header().Add("Content-Type", "image/svg+xml")
_, err = w.Write([]byte(iconGenerator.GenSvg(id, size)))
+ } else if ct == "jpeg" || cth == "image/jpeg" {
+ w.Header().Add("Content-Type", "image/webp")
+ err = jpeg.Encode(w, iconGenerator.GenIcon(id, size), nil)
} else {
w.Header().Add("Content-Type", "image/png")
err = png.Encode(w, iconGenerator.GenIcon(id, size))
diff --git a/static/index.html b/static/index.html
index 7e18aa8..4ef8d90 100644
--- a/static/index.html
+++ b/static/index.html
@@ -189,6 +189,7 @@