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?

2 Answers 2


The PNG files are named using a MD5 hash of the website URL. For example, the name for the Google image is stored by hashing www.google.com to get 0A137B375CC3881A70E186CE2172C8D1.png


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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .