discourse/app/jobs/regular/resize_emoji.rb

15 lines
248 B
Ruby
Raw Normal View History

module Jobs
class ResizeEmoji < Jobs::Base
def execute(args)
path = args[:path]
return unless File.exists?(path)
# make sure emoji aren't too big
2015-02-20 11:24:37 -05:00
OptimizedImage.downsize(path, path, 60, 60, true)
end
end
end