New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notification emails should use resized avatars #2625
Comments
They are resized - we keep three versions I think. The bug here is that the wrong version is used on the email not that we don't resize them. |
I assume this was an OSM hosted avatar by the way? Obviously the story is a bit different for gravatar hosted avatars. |
Hmm - it is supposed to use the 50x50 version: https://github.com/openstreetmap/openstreetmap-website/blob/master/app/mailers/notifier.rb#L192 Can you identify the user whose avatar caused the problem? |
Sure, that was Dimesh from changeset 84683636. I'm not sure how Gravatars are delivered but I suppose they'd come directly from their servers - here you can still see in the URL that he originally uploaded a digicam picture unmodified. |
Thanks - ignore the gravatar comment. In turns out we don't attach those anyway. |
I just checked the file from the mail again; it's really a verbatim digicam photo, 4000x3000 resolution with all the EXIF tags in, likely completely unprocessed as I suppose one would have to explicitly copy over the EXIF stuff then. |
Yes it appears that asking for the blob of a variant actually gets you the original image not the resized version:
|
I think https://stackoverflow.com/a/53965763/805631 is the solution. |
See also rails/rails#33037. |
I just received a notification email for a reply to a changeset comment with an attached 8 MB avatar picture. Apparently the avatars are properly resized for display on the webpage but stored and sent in full resolution. While it might make sense for future adaptation to very high-res screens to store a somewhat higher resolution than the 100x66 or whatever that is usually shown, that seems a bit excessive. Avatars should be resized to something like 320x240 on upload.
The text was updated successfully, but these errors were encountered: