diff --git a/deluge/ui/webui/pages.py b/deluge/ui/webui/pages.py
index 706e3e552..bf5a10257 100644
--- a/deluge/ui/webui/pages.py
+++ b/deluge/ui/webui/pages.py
@@ -478,6 +478,16 @@ class template_style:
class pixmaps:
"use the deluge-images. located in data/pixmaps"
def GET(self, name):
+ if not name.endswith('.png'):
+ if name == 'paused':
+ name = 'inactive'
+ if name == 'error':
+ name = 'alert'
+ name = name + '16.png'
+
+ if not os.path.exists(get_pixmap(name)):
+ name = 'dht16.png'
+
web.header("Content-Type", "image/png")
f = open(get_pixmap(name) ,'rb')
print f.read()
diff --git a/deluge/ui/webui/templates/advanced/header.html b/deluge/ui/webui/templates/advanced/header.html
index eba913d7f..0bab1d04b 100644
--- a/deluge/ui/webui/templates/advanced/header.html
+++ b/deluge/ui/webui/templates/advanced/header.html
@@ -4,12 +4,9 @@ $def with (title, active_tab=None)