Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added optional generate param to generate_all_aliases #349

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

adamhadani
Copy link

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).

@adamhadani
Copy link
Author

@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?

@adamhadani
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant