diff --git a/lib/email/renderer.rb b/lib/email/renderer.rb index bb1768bd1b0..4f21cb8bf79 100644 --- a/lib/email/renderer.rb +++ b/lib/email/renderer.rb @@ -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 diff --git a/lib/email/styles.rb b/lib/email/styles.rb index e11f601df7d..35d09e815de 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -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