Leverage Browser caching working For css and javascript but not for images

249 Views Asked by At

In my website in htaccess I added

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year" 
ExpiresByType text/css "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##

After testing my site with https://developers.google.com/speed/pagespeed/insights

It is showing Leverage browser caching is working for css and javascript but not for images (both jpeg and png)

Please tell me if there is any error in above htaccess

0

There are 0 best solutions below