Closed Bug 740435 Opened 13 years ago Closed 13 years ago

Uploaded Profile Photos Can Be Massive

Categories

(Websites :: mozillalabs.com, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bensternthal, Assigned: jfong)

References

()

Details

See url Looking at pre-existing profile pics, it looks like they are not re-sized on upload and we just render them as-is Note this profile is pre-existing so it might be true that new photos are re-sized. Are we able to generate then cache a thumbnail something like what "sorl-thumbnail" does?
would be good to test w/ a new profile pic -- it's possible that we now resize, but that we have legacy files in there.
https://mozillalabs.allizom.org/en-US/profile/IDztI0qHTiS2WXYPaPgI4nJBF2s/ is an example of a too-big profile photo which we should fix. (at least set size in HTML output)
tested on dev, uploaded photo does not resize
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Confirmed size is now not huge but looks like we are not preserving aspect ratio so image can be skewed. If this is easy, set width to 140 but preserve aspect ratio for height. Check if PIL thumbnail does this automagically.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
PIL does not do this automatically, we actually have to run our own method to adjust the aspect ratio.
Ah correction - apparently the thumbnail command does it. Will apply a fix update
Commits pushed to master at https://github.com/mozilla/betafarm https://github.com/mozilla/betafarm/commit/f209bca3bc8507406e22ae189b205b4e79108d14 fixed resize to maintain aspect ratio; fix bug 740435 https://github.com/mozilla/betafarm/commit/abad6427cb24cae2648d9b8bb0e71271f11b3363 Merge pull request #43 from ednapiranha/master fixed resize to maintain aspect ratio; fix bug 740435
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Verified that very large images are resized appropriately for profile pictures.
Status: RESOLVED → VERIFIED
Component: Betafarm → mozillalabs.com
You need to log in before you can comment on or make changes to this bug.