easy-thumbnails
easy-thumbnails copied to clipboard
Added optional generate param to generate_all_aliases
Hey, I found it useful to be able to pass in the generate=True parameter to generate_all_aliases, e.g in some cases where I use this with a signal handler / async. task. Pretty straight forward and seems useful.
On a side note, I couldn't figure out a way to have automatic re-generation of thumbnails when I change the original image (e.g when original image ImageField is already populated and had thumbnails generated, if i change it by uploading new file, I cannot seem to get easy-thumbnails to re-generate thumbnails automatically based on the fact file is modified, when trying to use the saved_file receiver/signals as suggested in documentation).
@SmileyChris upon testing this further It looks like this is not quite doing what I'd like which is to force regeneration even if thumbnail already exists for image (mostly solving my refreshing of previously existing images issue i mentioned). Whats the best way to do it? I could easily add a force_generate flag or alter behaviour of generate to also force generating even if thumbnail already exists, but maybe there's already a better way?
@SmileyChris - Ended up introducing a 'force' flag that can be passed in to generate_all_aliases / get_thumbnail, this is pretty useful for me, interested to hear your thoughts / any alternatives as mentioned above