Replies: 1 comment
-
Hi @amureki, This package actually does ship with a set of validators, like a Additionally, we could consider a byte-size validator. However, the compressed file size and the memory required to process said image are not closely related. Pre-processing doesn't make sense. This package is already pretty memory efficient, and it would be fairly unintuitive to add edge case handling above a certain image dimension. Best |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings and thanks for the library!
We encountered memory issues when django-pictures processed large images in production with our setup:
A 15000x8000px image (the file was only 481KB PNG) generated 180+ variants, consuming ~1.5GB+ memory and causing our Heroku 2x dynos (1GB RAM) to crash.
We also noticed PIL's DecompressionBombWarning in the logs.
I am preparing some safe-guards within my codebase to prevent uploading such images, but I wonder if we can make it friendlier within the library. For example:
Also, maybe we could document the server requrements better (not sure if this makes sense, thus asking):
Cheers,
Rust
Beta Was this translation helpful? Give feedback.
All reactions