You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I save an instance of the model with this field, the image_field and image_height fields are populated with the original image size rather than the thumbnail size.
I couldn't find why this is happening, but after activating a higher level of debugging, I found that the object is saved twice:
once in the ThumbnailerImageField.save method, in this case, with the correct dimensions.
once more after that, with the original dimensions, although I couldn't find where this is happening yet.
I'm using Django==3.0.5 and easy-thumbnails==2.7.
The text was updated successfully, but these errors were encountered:
I personally couldn't find a way to fix it, but I implemented a workaround using a pre-save signal. See it below, assuming you have a model Figure with an attribute image:
Consider the following snippet:
When I save an instance of the model with this field, the image_field and image_height fields are populated with the original image size rather than the thumbnail size.
I couldn't find why this is happening, but after activating a higher level of debugging, I found that the object is saved twice:
I'm using Django==3.0.5 and easy-thumbnails==2.7.
The text was updated successfully, but these errors were encountered: