matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.26k stars 276 forks source link

Allowing for truncated images #482

Closed asterion2nd closed 5 years ago

asterion2nd commented 5 years ago

Is there a way to process truncated images?

Like setting a Boolean variable such as the one that is defined by the PIL module. from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True

vstoykov commented 5 years ago

From what I see you already posted the answer. You just need to import PIL.ImageFile and set ImageFile.LOAD_TRUNCATED_IMAGES = True somewhere in you code (in some models.py of some app, or in AppConfig.ready method in some of your apps. Or even in your settings.py file. I think that this should not be in the ImageKit project because it globally defines PIL's behavior (not only in ImageKit) and should be done per project (if needed). If it was a safe default then it would have been set already in PIL/Pillow.

I'm closing the issue because it's not ImageKit related.

LuisOtavioOliveira commented 11 months ago

Hi @asterion2nd, i want to know how did you solve the issue with firebase_analytics, i'm having the same problem and i don´t know how to solve this.

This is the issue that i'm talking https://github.com/firebase/flutterfire/issues/11271