Amy Pond Posted March 19, 2023 Posted March 19, 2023 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: I tried to reduce the image size (it's a png); this is a 360x100px and as you can see the image appears blurred: 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 opentype Posted March 19, 2023 Solution Posted March 19, 2023 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. abobader and Amy Pond 2
Amy Pond Posted March 19, 2023 Author Posted March 19, 2023 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...)
Randy Calvert Posted March 19, 2023 Posted March 19, 2023 As a stupid question... why not just upload a smaller image instead of trying to resize the existing one?
Amy Pond Posted March 19, 2023 Author Posted March 19, 2023 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.
opentype Posted March 19, 2023 Posted March 19, 2023 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. Amy Pond 1
Amy Pond Posted March 19, 2023 Author Posted March 19, 2023 Just now, opentype said: Non userei una percentuale, no. Dovrebbe essere un valore di pixel assoluto. If I may ask, why not a percentage?
opentype Posted March 19, 2023 Posted March 19, 2023 Just now, Amy Pond said: If I may ask, why not a percentage? 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. Marc, Amy Pond and abobader 2 1
Amy Pond Posted March 20, 2023 Author Posted March 20, 2023 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!
Recommended Posts