How does Safari name the 'Apple Touch Icon' files? The touch icon files used in Safari are stored on a mac in the folder ~/Library/Safari/Touch Icons, and each file in a .png file, with what seems to be an arbitrary name.

By swapping an image in this folder, I can change the image displayed in Safari in the bookmarks bar.  However, I can't do the same for the bookmarks without an image already in the folder.

Does anyone know how Safari names these files, and how it connects a bookmark to this image?
If you bookmark a page that shows an icon for it under the Bookmarks menu, it (the image) is stored in the ~/Library/Safari/WebpageIcons.db file, which is an SQLite version 3 database. Images stored within the database can be in different formats, e.g. .ico, .png, etc.

If you really want to change the icon, that's in the database, I've done it with DB Browser for SQLite.