Jump to content

Resize logo in email wrapper


Go to solution Solved by opentype,

Recommended Posts

Posted

Hello,

I'd like to resize the logo in the email wrapper: now is too large, despite it's 648x180px.

From mobile it appears in this way:

Could contain: Advertisement, Poster, Page, Text, File, Animal, Bird

I tried to reduce the image size (it's a png); this is a 360x100px and as you can see the image appears blurred:

Could contain: Page, Text

Is there a way to have the email body large like in the second screen but without having the blurred image?

I hope I was clear, I have some difficulty with English 🥲

  • Solution
Posted

Personally, I wouldn’t bother with it and just use the original image size. 

If you really need to change it, you would have to customize the email wrapper template under Customization → Appearance → Email → Email Wrapper. 

It’s this line that automatically uses the image size: 

<img src='{file="\IPS\Settings::i()->email_logo" extension="core_Theme"}' alt="{setting="board_name"}" width='{$imgDims[0]}' height='{$imgDims[1]}' />

You could use hard-coded values for width and height, for example at half the size of the image. 

Posted
5 minutes ago, opentype said:

Personally, I wouldn’t bother with it and just use the original image size. 

I'd try to do it, but with a smaller image the results it's a blurred image 😕

5 minutes ago, opentype said:

You could use hard-coded values for width and height

Then I can use a percentual value like in a normal css code, right? Like this?

<img src='{file="\IPS\Settings::i()->email_logo" extension="core_Theme"}' alt="{setting="board_name"}" width= 80%; height=auto;'/>

(how can I insert code here? I don't have the option in the editor to do it...)

Posted
2 minutes ago, Randy Calvert said:

As a stupid question...  why not just upload a smaller image instead of trying to resize the existing one?

As I said, I tried. But the image, even if only a little bit smaller (now is 648px wide, I tried with 550px), appears blurred.

Posted
2 minutes ago, Randy Calvert said:

As a stupid question...  why not just upload a smaller image instead of trying to resize the existing one?

If it’s a high-resolution screen the original size will indeed look a little blurred. To solve it, showing the logo in like 50% would be better and make no difference for people who have a regular resolution. That’s what I do for the theme logo as well. 

22 minutes ago, Amy Pond said:


Then I can use a percentual value like in a normal css code, right? Like this?

I wouldn’t use a percentage, no. It should be an absolute pixel value. 

Posted
19 hours ago, opentype said:

It would relate to the window size. If you set it to 50%, it gets too small on a phone, but get huuuuuge (and blurry again) when someone reads the email on a desktop computer on 30 inch screen. 

Thank you, you're right 🙂 

I'll do as you say and it works perfectly. Thanks again!

  • Recently Browsing   0 members

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