I'm trying to speed up my site a bit. How can I add Expire headers to images I upload? Must this be done with Apache configuration, or is there a setting or plugin to do the job?

1 Answer 1


This can be done with Apache configuration, I have used this snippet in the past in .htaccess:

ExpiresActive On 
ExpiresByType image/gif "access plus 1 month" 
ExpiresByType image/png "access plus 1 month" 
ExpiresByType image/jpeg "access plus 1 month"

Can be set up with plugin as well. W3 Total Cache (which I currently use) can do that among other things.

Overall this is not a huge performance factor. Modern browsers are smart enough about caching images even without expires set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.