Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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