Closed vparenti closed 8 years ago
This is mentioned in the documentation: https://github.com/jonasundderwolf/django-image-cropping#thumbnail-size
Thanks but I don't want set it in settings.py. I want change values in ModelForm class.
Yes, you should subclass the widget (the respective widget depends on your field type; you can see the checks in the formfield_for_dbfield
-method of the mixin) and adjust the data-thumbnail-url
-attr, so that it points to a thumbnail of your desired size.
Right now things are not as flexible as they could be. In the long run it would be nicer if one could set the desired thumbnail size directly on the widget (with a fallback to settings.IMAGE_CROPPING_THUMB_SIZE
).
I would change cropping size in ModelAdmin class. It's possible? should I override ImageCroppingMixin? What widget should I modify? Thanks, Vittorino