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

Can't use width_field= and height_field= options #1

Open
akaihola opened this issue Jun 6, 2013 · 1 comment
Open

Can't use width_field= and height_field= options #1

akaihola opened this issue Jun 6, 2013 · 1 comment

Comments

@akaihola
Copy link

akaihola commented Jun 6, 2013

Is there any work-around to get image dimensions automatically into the model like stock Django does with the width_field= and height_field= options?

@vdboor
Copy link
Member

vdboor commented Jul 5, 2013

Hi, there is currently no workaround for this. Currently we just proxy the fields, and use whatever they have available. Not all backends support these tags. We could implement this missing feature within django-any-imagefield however, so no matter what backend you use, the feature will work (hence marking as "enhancement").

For my projects, I wrap all images in a sorl.thumbnail tag, to restrict the size at the frontend. This could also be a usable workaround, as SORL will store/cache the width and height fields for you.

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

2 participants