As the title says, how do we add expires headers to external images like my gravatar in here?
You cannot.
It's the server that sets the expiry date, unless you control the server you can't do much about it.
But out of curiosity, why would you want to add an expire header to external images?
to get the maximum score on pingdom or similar websites? ;) Your score is already perfect, I get a C score
https://screenshots.firefox.com/OkTZwfwoZWPeKzWN/tools.pingdom.com
Shouldn't expires headers be our good practise, even on the external images or other external files?
But I get it that we cannot add it to the external files since we are not in control of their servers, except by caching them locally.
So, can any of the mentioned addons actually cache them?
It may be, but honestly control the web is just a waste of time and resources to me. :P
External images are cached because of the http/https thingy, not sure though if all images are cached or only the http ones.
My mod won’t mess with the expires headers. It just passes the image through to the other application. If you use the nginx option you can modify the headers or use your own custom camo or weserv server aswell actually.