Jump to content

4.6.6 Email Header Logo HUGE


Recommended Posts

That appears to be the issue.  Is there no way to just make the image 100% width in the email versus a hard coded size?  This would probably fix it for everyone.  Since the community resizes images gracefully, I just assumed that email would as well.  Is there a recommended image width if not?  The layout is a bit wonky if it's not set to 100%.

Link to comment
Share on other sites

The fix in the email template seems easy enough...  see below.  thoughts?

Email template: Email Wrapper

Before:

<a href='{setting="base_url"}' style='text-decoration: none; color: #262e33; border: 0;'>
						{{$imgDims=NULL;}}
						{{if \IPS\Settings::i()->email_logo}}
							{{try { $imgDims = \IPS\File::get( 'core_Theme', \IPS\Settings::i()->email_logo )->getImageDimensions(); } catch( \Exception $e ) {} }}
						{{endif}}
						{{if $imgDims}}
							<img src='{file="\IPS\Settings::i()->email_logo" extension="core_Theme"}' alt="{setting="board_name"}" width='{$imgDims[0]}' height='{$imgDims[1]}' />
						{{else}}
							{setting="board_name"}
						{{endif}}
</a>

After:

<a href='{setting="base_url"}' style='text-decoration: none; color: #262e33; border: 0;'>
						{{$imgDims=NULL;}}
						{{if \IPS\Settings::i()->email_logo}}
							{{try { $imgDims = \IPS\File::get( 'core_Theme', \IPS\Settings::i()->email_logo )->getImageDimensions(); } catch( \Exception $e ) {} }}
						{{endif}}
						{{if $imgDims}}
							<img src='{file="\IPS\Settings::i()->email_logo" extension="core_Theme"}' alt="{setting="board_name"}" width='100%' />
						{{else}}
							{setting="board_name"}
						{{endif}}
</a>

The key change being to set width to 100% (and delete the hard coded height and width).  Height will then auto calculate.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...