codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
378 stars 69 forks source link

distorted logo in email #1300

Open cellio opened 5 months ago

cellio commented 5 months ago

A user received email with the following distorted Codidact logo:

screen shot

The client here is ProtonMail. I don't happen to have other Codidact email handy to test with.

It appears that the width and height are set as 167 and 40 in app/views/layouts/mail.html.erb. I found app/assets/images/codidact.png (I do not know if that is the correct file) and its size is 997 x 239 px. This is close to but not the same w:h ratio as in the mail header, and the offset doesn't seem large enough to cause this level of distortion, but image manipulation is not something I know much about.

If this is the correct image source file, is that the correct size?
Should the mail header try to scale it (as now), or should it use an exact size?
If it should use an exact size, does that mean we need a smaller version of the logo for this purpose?
Or is there some better way to do all this?

I also note in passing that this mailer layout depends specifically on our network, and other instances would need to modify this to use their own URL and logo. That seems like something we also want to address, but separately.