Upgrade nuked my avatar


(Patrick Klug) #1

Just upgraded forum.greenheartgames.com to v0.9.9.6 and it seems that my custom gravatar avatar has been nuked:

This is odd since here, at meta.discourse, my avatar remains correctly even though I use the same email address on both forums:

Any known issues?


(Patrick Klug) #2

seems to have corrected itself after a few minutes but curiously, the images are not the same.

(left: greenheartgames.com, right (correct): meta.discourse). Is there some weird image processing going on?


(Régis Hanol) #3

Gravatars are downloaded/cached locally gradually in order to make sure we don’t DoS gravatars :wink:


(Patrick Klug) #4

@zogstrip any idea why the resulting image would change? (see my edit)


(Régis Hanol) #5

Yes, we do some lightweight image processing in order to best optimize the images


(Patrick Klug) #6

why would it be different here than on our forum. is there some different code running?


(Régis Hanol) #7

I believe this optimization was added afterwards. Your image on meta was cached without the sharping.


(Sam Saffron) #8

Algorithm changed, recommend we nuke all old optimised images


(Patrick Klug) #9

Well, I think the algorithm used here works a million times better on my avatar :confused:


(Jeff Atwood) #10

@sam will be happy to hear that! In general, you want to apply a “sharpen” filter to small images for best look, and that’s effectively what is happening now.

Also bilinear vs. bicubic filtering, bicubic does some mild sharpening so is very good when sizing down.

http://blog.codinghorror.com/the-myth-of-infinite-detail-bilinear-vs-bicubic/


(Bcguy) #11

I also just upgraded - and was hoping it would fix the Avatar scaling (fattening) issue in my avatar’s case - but no luck.

Do you guys plan to fix this - or should I be telling people to upload their Avatar again?


(Bcguy) #12

Ah - just saw this - I “think” this will fix my problem - but wasn’t this is 9.9.6?


(Sam Saffron) #13

We are looking at a way of nuking all OptimisedImages (storing a global version) and rebuilding, the only issue with it is that if you are using S3 for images there will be a ton of work involved.


(Patrick Klug) #14

Do I understand you correctly that my avatar as shown on meta.discourse uses the newest algorithm and that after an update the one on our forum should like the same as here?


(Sam Saffron) #15

Our image system de-duplicates, its likely the old problem image was resized using the old algorithm.

If you want to confirm the good one is in place go to

https://your-site/user_avatar/meta.discourse.org/pakl/<size>/9157.png

Replace with a custom size that, that is not yet optimised.

We will try to figure out a clean way to nuke all old optimised images so you can rebuild.


(Patrick Klug) #16

Seems this still generates the much bulkier looking version on my site (example: 33px):

forum.ghg:

meta.discourse:

Which one is now considered to be the correct algorithm? As mentioned before, I think that the meta.discourse version looks a lot better.


(Sam Saffron) #17

Are you on our Docker setup? The version of image magick you are using will have an effect on results.


(Patrick Klug) #18

pretty sure I am. @Azathoth can you confirm?


(Sam Saffron) #19

Should be pretty easy for you to confirm, just try to navigate to /admin/docker if it comes up with a page you are using our docker install, if not… time to upgrade to it.


(Patrick Klug) #20

yep, docker is up to date - discourse is running on v.0.9.9.6: