Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce filesystem work #15

Open
jensenbox opened this issue Sep 16, 2012 · 3 comments
Open

Reduce filesystem work #15

jensenbox opened this issue Sep 16, 2012 · 3 comments

Comments

@jensenbox
Copy link

So I just started out adding in django-image-cropping on a simple project. All is well aside from a weird chrome anomoly.

I was moving uploaded files around and must have pointed my storage to an invalid location when I went to re-crop and bang, death because it could not read the file.

There are two issues with this, the first is this might happen in production - I would prefer it to either generate a thumbnail or use something like placehold.it. The second and more to the point... why is it hitting the filesystem? (answer: to get the image dimensions) - Would it not be better to just simply cache this data in a field instead of hitting the drive?

So the feature request is - create, or change the definition of the current field to store this extra data.

Thoughts?

@jonasvp
Copy link
Member

jonasvp commented Sep 17, 2012

That's a good idea! We'd just extend the ImageRatioField to store the image dimensions as well. That would make invalidation after changing an image a lot easier as well - if the dimensions don't match the actual image, we'd just discard the cropping.

Thanks for the suggestion!

@qwiboo
Copy link

qwiboo commented Nov 29, 2012

I agree, this would be great addition! Please implement it soon.

@anrie anrie self-assigned this Mar 10, 2015
@agfunder
Copy link

This hurt us today, because of an amazon DNS issue. But simply rendering should not require to load the object from storage to check size each time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants