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
I am trying to make different sizes/widths of thumbnails e.g. width=30 or width=40. For that I am following the basic setup given in your repository /examples/flask. But for some reason I am unable to save/update multiple thumbnails.
suppose I have a Person with an avatar field defined and I want to create two different sized thumbnails:
with StoreManager(db.session()):
thumbnail = person1.avatar.get_thumbnail(width=32, auto_generate=True)
db.session.commit()
The value of avatar field in DB, after running the code lines above:
and when I re run the same code to get another thumbnail of different width (40) i.e.:
with StoreManager(db.session()):
thumbnail = person1.avatar.get_thumbnail(width=40, auto_generate=True)
db.session.commit()
It does not change anything in avatar field in DB, though I guess it is supposed to append a list for another thumbnail in avatar thumbnails.
Also re running the method get_thumbnail(width=40, auto_generate=True), keeps making new image files in thumbnail directory and changes nothing in the DB.
Can you please let me know if I am doing something wrong?
The text was updated successfully, but these errors were encountered:
Hi @pylover , a nice piece of work!
I am trying to make different sizes/widths of thumbnails e.g. width=30 or width=40. For that I am following the basic setup given in your repository /examples/flask. But for some reason I am unable to save/update multiple thumbnails.
suppose I have a Person with an avatar field defined and I want to create two different sized thumbnails:
The value of avatar field in DB, after running the code lines above:
and when I re run the same code to get another thumbnail of different width (40) i.e.:
It does not change anything in avatar field in DB, though I guess it is supposed to append a list for another thumbnail in avatar thumbnails.
Also re running the method get_thumbnail(width=40, auto_generate=True), keeps making new image files in thumbnail directory and changes nothing in the DB.
Can you please let me know if I am doing something wrong?
The text was updated successfully, but these errors were encountered: