Even the big guys make mistakes. Learn from them through articles on perf.fail. Yes, that is the fail top level domain.
An excerpt from one article:
Twitter doesn’t optimize profile images submitted by users. Beyond the expected 73x73px JPEGs (~70kb, 13 bytes per pixel) there are images with embedded geolocation data and the truly bizarre…
For instance, one user’s profile JPEG is 16kb; 5kb of image and 10.5k of 0x20 octets hanging off the end. Twitter appears to have mitigated this problem somewhat by enabling GZIP when serving images… which, by itself, is a topic for another perf fail post!
Read more at perf.fail