Return absolute URLs for user images
authorTom Hughes <tom@compton.nu>
Tue, 16 Jul 2019 21:28:36 +0000 (22:28 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 16 Jul 2019 21:28:36 +0000 (22:28 +0100)
app/helpers/user_helper.rb

index c22fef1..86990f9 100644 (file)
@@ -50,7 +50,7 @@ module UserHelper
     if user.image_use_gravatar
       user_gravatar_url(user, options)
     elsif user.avatar.attached?
-      url_for(user.avatar.variant(:resize => "100x100>"))
+      polymorphic_url(user.avatar.variant(:resize => "100x100>"))
     elsif user.image.file?
       image_url(user.image.url(:large))
     else