From d2fb2bc4cdde1ab939f002f0c143d5a12726fa7c Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Mon, 20 Oct 2014 10:38:21 -0700 Subject: [PATCH] another approach on mobile email images --- lib/email/styles.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/email/styles.rb b/lib/email/styles.rb index 92b5336ad..c39583361 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -35,7 +35,10 @@ module Email img['width'] = 20 img['height'] = 20 else - add_styles(img, 'max-width:100%;height:auto;') if img['style'] !~ /max-width/ + # having no extra style on email images might work best? + img['width'] = 'auto' + img['height'] = 'auto' + # add_styles(img, 'max-width:100%;') if img['style'] !~ /max-width/ end # ensure all urls are absolute