This relatively simple, free tool will allow you to tell it the name of a folder on your Mac that contains the root level index.html for your iWeb website.
That done, it checks all of the PNG, TIFF, JPEG and GIF files for duplicates (by using md5). All images that have duplicates are then listed, and you can then click on one to see what pages are using it.
Finally, clicking on “Optimize” will, after a cautionary prompt, traverse your site, moving one copy of each duplicated image to a new “images” folder in the root folder of the site. All other duplicates are deleted, and all .html files are updated to refer to the images/xxxx files.
It’s simple, and may have some issues with older versions of iWeb pages, or templates that I haven’t used.
It makes the following assumptions: