The image doesn't matter. Even a broken URL will give you a badge. It takes your first post in the thread that has an img tag and I think Foxpup is right about it using the message ID to derive a random number.
Let me fix mine

It takes a lot longer now to change than it did this morning. 1000+ posts breaking KYC

Congrats, you got a nice one, what with being good at stats. Theymos not so good at spelling though.
