Question

I'm struggling with ImageWithThumbnailsField which seems deprecated. What should I use instead? I don't want to rewrite large parts of my project as I'm doing only slight bugfixing and updating...

Error I'm getting:

File "/var/www/project/images/models.py", line 6, in from sorl.thumbnail.fields import ImageWithThumbnailsField ImportError: cannot import name ImageWithThumbnailsField

Was it helpful?

Solution

That must have been a very old version of sorl-thumbnail you were using. I'm not sure what that field actually did for you, but now all you have is ImageField. It serves to automatically update the thumbnail registry if you change or delete it and adds a thumbnail of the assigned image next to the form field in the admin.

If you're missing any other functionality, it would be best to actually ask what you can do about that particular functionality specifically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top