diff options
author | Go MAEDA <maeda@farend.jp> | 2022-08-28 06:35:42 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-08-28 06:35:42 +0000 |
commit | 54f281fef90faba7ba75642e2dc265f345b6f618 (patch) | |
tree | e4bb6df7eb777c7420f9ffbaf4cbfbfc0db23295 /app/helpers | |
parent | 8d6c82316d90dc16f5fa0f601489da25177a0e10 (diff) | |
download | redmine-54f281fef90faba7ba75642e2dc265f345b6f618.tar.gz redmine-54f281fef90faba7ba75642e2dc265f345b6f618.zip |
Don't create two thumbnails of different resolutions for a single image (#37597).
Patch by Go MAEDA.
git-svn-id: https://svn.redmine.org/redmine/trunk@21784 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e2eebfa41..e21dabe5c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -319,10 +319,11 @@ module ApplicationHelper def thumbnail_tag(attachment) thumbnail_size = Setting.thumbnails_size.to_i + thumbnail_path = thumbnail_path(attachment, :size => thumbnail_size * 2) link_to( image_tag( - thumbnail_path(attachment), - :srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x", + thumbnail_path, + :srcset => "#{thumbnail_path} 2x", :style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;", :loading => "lazy" ), |