From 5432cb6db5c0f30e73b2b279a793ede97e095301 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 13 May 2020 11:29:02 +0100 Subject: [PATCH] Attach resized images to notification emails Fixes #2625 --- app/mailers/notifier.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index c60dff84b..10bbb10da 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -192,7 +192,8 @@ class Notifier < ApplicationMailer def user_avatar_file(user) avatar = user&.avatar if avatar&.attached? - avatar.variant(:resize => "50x50>").blob.download + image = avatar.variant(:resize => "50x50>").processed + image.service.download(image.key) else File.read(Rails.root.join("app/assets/images/avatar_small.png")) end -- 2.39.5