From ec6f25e16bcd64e266b82ecaaba104741bf6f5eb Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 10 Oct 2022 23:16:44 +0200 Subject: [PATCH] Use appropriate image sizes and lazy loading in questions --- app/views/question/_question.haml | 2 +- app/views/shared/_question.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/question/_question.haml b/app/views/question/_question.haml index 7892d881..e3fef94d 100644 --- a/app/views/question/_question.haml +++ b/app/views/question/_question.haml @@ -4,7 +4,7 @@ .media - unless question.author_is_anonymous %a.pull-left{ href: unless hidden then user_path(question.user) end } - %img.answerbox__question-user-avatar.avatar-md{ src: question.user.profile_picture.url(:medium) } + %img.answerbox__question-user-avatar.avatar-md{ src: question.user.profile_picture.url(:small) } .media-body - if user_signed_in? .pull-right diff --git a/app/views/shared/_question.haml b/app/views/shared/_question.haml index dbf6b9a3..a3c8478c 100644 --- a/app/views/shared/_question.haml +++ b/app/views/shared/_question.haml @@ -5,7 +5,7 @@ - if type == 'discover' .pull-left %a{ href: user_screen_name(q.user, link_only: true) } - %img.avatar-md.mr-2{ src: q.user&.profile_picture&.url(:medium) } + %img.avatar-md.mr-2{ src: q.user&.profile_picture&.url(:small), loading: :lazy } .media-body - if user_signed_in? .pull-right