diff --git a/app/controllers/user_avatars_controller.rb b/app/controllers/user_avatars_controller.rb index f8befd482aa..3e57b9d4043 100644 --- a/app/controllers/user_avatars_controller.rb +++ b/app/controllers/user_avatars_controller.rb @@ -52,14 +52,13 @@ class UserAvatarsController < ApplicationController image = nil version = params[:version].to_i - return render_dot unless version > 0 && user_avatar = user.user_avatar upload = Upload.find_by(id: version) if user_avatar.contains_upload?(version) upload ||= user.uploaded_avatar if user.uploaded_avatar_id == version if user.uploaded_avatar && !upload - return redirect_to "/avatar/#{hostname}/#{user.username_lower}/#{size}/#{user.uploaded_avatar_id}.png" + return redirect_to "/user_avatar/#{hostname}/#{user.username_lower}/#{size}/#{user.uploaded_avatar_id}.png" elsif upload original = Discourse.store.path_for(upload) if Discourse.store.external? || File.exists?(original)