Commit 9f6df3d8 authored by jplang's avatar jplang

Fix thumbnail rendering for images with height >> width.

git-svn-id: https://svn.redmine.org/redmine/trunk@16813 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 008e5d64
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment