mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 08:24:05 +08:00
FIX: Don't use auto sizes for very small images (emoticons)
This commit is contained in:
parent
8199c3b440
commit
5defaca197
|
@ -15,7 +15,6 @@ module Email
|
|||
end
|
||||
|
||||
def html
|
||||
|
||||
if @message.html_part
|
||||
style = Email::Styles.new(@message.html_part.body.to_s)
|
||||
style.format_basic
|
||||
|
|
|
@ -37,8 +37,8 @@ module Email
|
|||
img['height'] = 20
|
||||
else
|
||||
# having no extra style on email images might work best?
|
||||
img['width'] = 'auto'
|
||||
img['height'] = 'auto'
|
||||
img['width'] = 'auto' if img['width'].to_i > 20
|
||||
img['height'] = 'auto' if img['height'].to_i > 20
|
||||
add_styles(img, 'max-width:100%;') if img['style'] !~ /max-width/
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user