8

I have noticed that thumbnails on Mac OS X don't seem to be generated every time I open a folder, but to be somehow "cached" instead.

I wasn't able, however, to find a folder where they clearly look to be stored.

I thought then they could be saved as some kind of metadata; i found, however, that when deleting a file (e.g. from the Desktop) and saving immediately after a file by the same name, the preview for the previous file is showed for ~ a second.

Are they stored separately from data? How and when are they invalidated (e.g. only when a file by the same name appears in the same directory)?

Synetech
  • 68,243
  • 36
  • 223
  • 356
  • Probably in the infamous `.DS_Store` file in the same directory. – Daniel Beck Oct 19 '12 at 15:51
  • I also took this as a possibility, however it [doesn't seem to contain](https://wiki.mozilla.org/DS_Store_File_Format) anything about the thumbnails. –  Oct 19 '12 at 16:03

1 Answers1

5

The quicklookd background process is responsible for creating and managing file thumbnails. Those thumbnails are stored in a folder named com.apple.QuickLook.thumbnailcache in a folder like /var/folders/39/ggldtdps6034ct7d_y6x4_v80000gn/C that is specific to your user account. The file index.sqlite contains a SQLite database with information about stored thumbnails; access it using the sqlite3 command line tool.

Daniel Beck
  • 109,300
  • 14
  • 287
  • 334
  • Great! I was able to dump the `index.sqlite` db, take a look and get an insight of how this works! Thanks :) –  Oct 19 '12 at 17:17
  • 1
    On macOS Big Sur, `find /var -name com.apple.QuickLook.thumbnailcache` returns nothing. Maybe the path has changed? – Hey Jul 14 '21 at 11:56