diff options
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/mastodon.rake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 037a13398..a8fb58b7f 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -92,5 +92,17 @@ namespace :mastodon do Rails.logger.debug 'Done!' end + + desc 'Generate static versions of GIF avatars/headers' + task add_static_avatars: :environment do + Rails.logger.debug 'Generating static avatars/headers for GIF ones...' + + Account.unscoped.where(avatar_content_type: 'image/gif').or(Account.unscoped.where(header_content_type: 'image/gif')).find_each do |account| + account.avatar.reprocess! + account.header.reprocess! + end + + Rails.logger.debug 'Done!' + end end end |