-
-
I'm not wild about always fetching a larger file and scaling it down. For retina displays, there are ways to say "Here's the retina version you should fetch, if you do retina," which we should make use of instead. I'm not sure how to do that with gravatars, though. Need to look into it more... They advertised retina support recently, but don't say anything besides" fetch larger images."
Add facilities for reloading gravatar images in retina resolution.
Review Request #3482 — Created Nov. 8, 2012 and submitted
Add facilities for reloading gravatar images in retina resolution. This adds a jQuery function which, when applied to an <img class="gravatar"> will parse the URL and reload it at the appropriate resolution for high-resolution devices. This requires some javascript on the reviewboard side as well, to call it in the relevant places.
Used this on my local install and saw it fetch a 64x64 image instead of a 32x32 one for the gravatar in the upper right corner of the page.
Description | From | Last Updated |
---|---|---|
I'm not wild about always fetching a larger file and scaling it down. For retina displays, there are ways to … |
chipx86 | |
To help satisfy lintian checkers I want to put in later, this should be in the form of: var src … |
chipx86 | |
should be parseInt(parts[1], 10); |
chipx86 | |
Weirdly, it's possible, I believe, to have a devicePixelRatio that's not a round number. Maybe we should Math.floor this. |
chipx86 | |
Add a ; |
chipx86 |
- Change Summary:
-
Reload the images in javascript instead of always loading the 2x image.
- Summary:
-
Use retina gravatars.Add facilities for reloading gravatar images in retina resolution.
- Description:
-
~ Use retina gravatars.
~ Add facilities for reloading gravatar images in retina resolution.
~ When fetching gravatars for a given size, actually fetch the image for twice
~ that size but let the browser scale it down. ~ This adds a jQuery function which, when applied to an <img class="gravatar">
~ will parse the URL and reload it at the appropriate resolution for + high-resolution devices. This requires some javascript on the reviewboard side + as well, to call it in the relevant places.