Skip to content

Commit

Permalink
fix: Don't optimize images implicitly (#26177)
Browse files Browse the repository at this point in the history
Makes screenshots in comments unreadable with no way to opt out of it.
  • Loading branch information
ankush committed Apr 26, 2024
1 parent dc64678 commit 71dfffa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions frappe/core/doctype/file/utils.py
Expand Up @@ -12,7 +12,6 @@
from frappe import _, safe_decode
from frappe.utils import cint, cstr, encode, get_files_path, random_string, strip
from frappe.utils.file_manager import safe_b64decode
from frappe.utils.image import optimize_image

if TYPE_CHECKING:
from PIL.ImageFile import ImageFile
Expand Down Expand Up @@ -237,8 +236,6 @@ def _save_file(match):
content = content.split(b",")[1]
content = safe_b64decode(content)

content = optimize_image(content, mtype)

if "filename=" in headers:
filename = headers.split("filename=")[-1]
filename = safe_decode(filename).split(";", 1)[0]
Expand Down

0 comments on commit 71dfffa

Please sign in to comment.