I recently inherited a rather large website with a gigantic, catastrophic mess of poorly named and organized images spread across multiple folders, referenced from multiple locations. I'm trying to consolidate some of the assets of the site and I need to know which of the hundreds of images are actually being used. Some of them may rest in image tags, others may be set as backgrounds using css, and still others may be created at runtime with javascript.
Because the images are so numerous, and because there is no discernible naming convention (i.e., img-asdfasd83mmd.png), and because the version control system in place up until my arrival consisted of duplicating existing files and only slightly changing the names of the old(i.e., img-asdfasdfasdfasf.png, img-asdfasdfasdf2.png, img-asdfasdfasdf-version4-final.png), this task isn't as simple as a quick visual scan.
I'm looking for an automated solution that will scan the source of this website and determine which images are being used and which aren't. Anything that provides some kind of solution for site-wide renaming of assets with automatic reference updates would be nice too. Thanks!