The Ruby on Rails asset pipeline automatically adds a fingerprint to assets (JS, CSS, and other files in the assets folder including images) upon deployment so that cached assets are automatically served fresh as new files.
Example:
- Original file: small-dog.jpg
- Deployed file: small-dog-984943978214378624.jpg
- Re-deployed file: small-dog-234519389656103219.jpg
Each time a deployment happens, the fingerprint of the file name changes. Two problems I can think of are 404 errors for outdated paths and the possible hurt in SEO ranking of that particular image with the "reset." Do search engines see it as a new image each time, have to crawl it again, and reset its former search ranking?
Google recommends fingerprinting but doesn't say much too about image files in particular.