diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-10 21:19:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-10 21:19:19 +0000 |
commit | ffea3d5ba3cea6a5f6b1d500ae5417fe158a4546 (patch) | |
tree | d2eb8c78ff5c342c1f352594bb1f52dd35ba97e8 | |
parent | 60e07b9bb31a11475981576f254c7905273f093e (diff) | |
download | redmine-ffea3d5ba3cea6a5f6b1d500ae5417fe158a4546.tar.gz redmine-ffea3d5ba3cea6a5f6b1d500ae5417fe158a4546.zip |
Fix thumbnail rendering for images with height >> width.
git-svn-id: http://svn.redmine.org/redmine/trunk@16813 e93f8b46-1217-0410-a6f0-8f06a7374b81
-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 52a405211..3409bb7be 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -220,11 +220,12 @@ module ApplicationHelper end def thumbnail_tag(attachment) + thumbnail_size = Setting.thumbnails_size.to_i link_to( image_tag( thumbnail_path(attachment), - :srcset => "#{thumbnail_path(attachment, :size => Setting.thumbnails_size.to_i * 2)} 2x", - :width => Setting.thumbnails_size + :srcset => "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x", + :style => "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;" ), named_attachment_path( attachment, |