Uploading image fails

When i am trying to upload/attach an image file to any documents, website, program, course, HR/Employee and etc it fails and this error message comes up (strip_exif_metadata_from_uploaded_images). please let me know if there is any solution.

Check if you max upload file size set. Not sure where the code is located. Or try to compress image file using https://squoosh.app/ and reupload.

yes i think so it might be problem with the file size but i checked with very small size pictures too and it is not working. how can i find the code because i am no pro in erpnext?

yes the conversion worked, now how can i change the code to be able to upload higher size pictures ? anyone can help ?

Here. You may try it. Currently max file size is 5MB. You would be able to on self hosted server. Note that large file upload have adverse effect and can slow down performance.

https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/articles/changing-attachment-limits

thanks Muzzy, but i found the problem is with jpg files, when i add *.webp or *.png it works except *.jpg it is not accepting *.jpg file anywhere. what do you think where the problem can be ?

Am sorry. No idea why. File type are not set as far as I know. Have uploaded Excel, PDF, jpeg etc. Never encountered this issue.

Relevant for V13:

https://github.com/frappe/frappe/pull/12014

In the meanwhile you can use https://squoosh.app/ to strip EXIF data and compress image file before uploading it.

Squoosh is from Google and works flawlessly.

Hers the Git link GitHub - GoogleChromeLabs/squoosh: Make images smaller using best-in-class codecs, right in the browser.

Hi @Muzzy,

Thanks for the tip. I wasn’t aware of that program.

My concern really isn’t about EXIF data, but merely about how to install my company’s logo as a favicon.ico. It ceased to be possible from V13-beta.9 (+/-4 months ago) due to addition of the System Settings >> Security option “Strip EXIF tags from uploaded images”.

The added code for stripping EXIF data depends on Python’s packages mimetypes and PIL, but they seem to disagree on the valid mimetype for an *.ico extension. It’s also possibly the case with guessing the correct mimetype from the *.jpg extension, as @NTotakhil originally posted ('though his error message is different from mine).

Wasnt aware that Strip EXIF tags from uploaded images is already in V13. Thank you pointing out. My site favicon is working fine. I upgraded from v10 to v12, and then to V13 beta and production couple for days back. I have not checked Strip EXIF tags from uploaded images however I have not uploaded any new image or tried on any fresh site.

BTW I use either .png or jpeg file. I dont use .ico files.

As a developer I tend to have an excessive number of browser windows, each with an excessive number of tabs open. Many of those are opened to this forum, or the ERPNext docs, or to numerous pages of the several ERPNext sites I have installed on the web or on my LAN.

They all display the ERPNext blue “E” as the tabs favicon.ico.

I get lost! Which one was I just looking at??? Arggggh! :skull_and_crossbones:

By branding my different sites with a different favicon.ico I can at least distinguish my own stuff from the ERPNext official stuff.