diff --git a/plexpy/api2.py b/plexpy/api2.py index 9cc36b49..b4328f96 100644 --- a/plexpy/api2.py +++ b/plexpy/api2.py @@ -675,7 +675,6 @@ General optional parameters: elif self._api_cmd == 'pms_image_proxy': if 'return_hash' not in self._api_kwargs: - cherrypy.response.headers['Content-Type'] = 'image/jpeg' return out['response']['data'] elif self._api_cmd == 'get_geoip_lookup': diff --git a/plexpy/webserve.py b/plexpy/webserve.py index c402092f..4aa3bd67 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -4753,7 +4753,12 @@ class WebInterface(object): if isinstance(img, str) and img.startswith('interfaces/default/images'): fp = os.path.join(plexpy.PROG_DIR, 'data', img) - return serve_file(path=fp, content_type='image/png') + ext = img.rsplit(".", 1)[-1] + if ext == 'svg': + content_type = 'image/svg+xml' + else: + content_type = 'image/{}'.format(ext) + return serve_file(path=fp, content_type=content_type) if not img and not rating_key: if fallback in common.DEFAULT_IMAGES: