diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py index 837da3056e..47df90d18c 100755 --- a/frappe/core/doctype/file/file.py +++ b/frappe/core/doctype/file/file.py @@ -683,7 +683,7 @@ def get_web_image(file_url): frappe.msgprint(_("Unable to read file format for {0}").format(file_url)) raise - image = Image.open(StringIO(str(r.content))) + image = Image.open(StringIO(frappe.safe_decode(r.content))) try: filename, extn = file_url.rsplit("/", 1)[1].rsplit(".", 1)