All we know we can specify a cache validator for images by adding following lines to .htaccess file:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>
.. and ..
<IfModule mod_headers.c>
<FilesMatch "\.(bmp|css|flv|gif|ico|jpg|jpeg|js|pdf|png|svg|swf|tif|tiff)$">
Header set Last-Modified "Mon, 31 Aug 2009 00:00:00 GMT"
</FilesMatch>
</IfModule>
But, it will be effective for real JPG or PNG files. However, the question is, how to specify cache validator for images that are built with PHP codes and imagejpeg/imagepng functions on fly? (above codes are not effective for them)
P.S: I have tried to simulate the URL of image created by PHP like a real image using .htaccess file (e.g: http://example.com/1.jpg
, which is generated by PHP file and is not a real .jpg image), but still receiving cache validator warning.