Thumbnail cache in Windows 7 / Vista – a rumination

Today I was thinking about the security implications of thumbnail caching systems on most PCs out there today. What I mean by that is this: whenever you use Windows Explorer to browse a directory that contains photos or other images, and you enable the “thumbnail view” feature, you would see a thumbnail of each of the images. By default, Windows caches these thumbnails, so that it doesn’t have to regenerate the thumbnails the next time you browse the same folder.

This has several implications in terms of privacy and security, since it means that a copy of each image is made elsewhere on the computer (albeit lower resolution), basically without the user’s knowledge. This is good news from a forensic examiner’s point of view, since the thumbnail cache can contain thumbnails of images that have long been deleted. However, from the user’s point of view, it can present a privacy/security issue, especially if the images in question are confidential or sensitive.

Windows XP caches thumbnails in the same folder as the original images. It creates a hidden file called “Thumbs.db” and stores all the thumbnails for the current folder in that file. So, even if the original images were deleted from the folder, the Thumbs.db file will still contain thumbnails that can be viewed at a later time.

However, in Windows 7 and Windows Vista, this is no longer the case. The thumbnails are now stored in a single centralized cache under the user’s profile directory: C:\Users\[username]\AppData\Local\Microsoft\Windows\Explorer\thumbcache*.db

The above directory contains multiple thumbnail cache files, each of which corresponds to a certain resolution of thumbnails: thumbcache_32.db, thumbcache_96.db, thumbcache_256.db, and thumbcache_1024.db.

So then, wouldn’t you like to find out what thumbnails your computer has cached in these files? Well, now you can! I’ve whipped up a small utility for the sole purpose of viewing the contents of these thumbnail caches:

This is probably not the first utility that does this, but it’s definitely the simplest. It automatically detects the thumbnail caches present on your computer, and lets you view all the thumbnail images in each cache.

If you want to disable the thumbnail cache in Windows 7 or Vista, you can find instructions here.

Share this article:
  • Facebook
  • LinkedIn
  • Reddit
  • Twitter

4 thoughts on “Thumbnail cache in Windows 7 / Vista – a rumination”

  1. Hello Dmitry,

    Religions are not “anti-human,” nor are they intended to focus on things that happen after you die, particularly Christianity, despite its stereotyped presentation. That’s a very unsophisticated simplification which unfortunately has a lot of reinforcement from media and loud people who don’t think very much, of which there are plenty on both sides of religion and atheism. Christianity actually conveys extremely high value on life and a system of treating each other well while on this planet, not just in an afterlife. (Please investigate the lives of people such as Albert Schweitzer, Dietrich Bonhoeffer, and Martin Luther King, Jr.). And yes, not all who claim to follow such beliefs actually hold to them in daily life (imagine what people could be like without any belief in something higher, though, ala Stalin or Kin Jong-Il). Although “believers” are not perfect by any stretch, many of the great works of art, architecture, and even science as well as other social infrastructure such as schools, hospitals, and charities have been inspired and created by believers. Inspiration actually means “to breathe life into (from God),” which is also something that a system of values that includes some gratitude, mystery, and awe (but not mute, unthinking indoctrination) can bring to the table and help balance pure rationalism (in a world that we do not completely understand anyway). It’s not a simple or clear cut thing by far to say that the world would be a better place without religion.

    I know that people tend to come down on one side of the fence or other about things such as this (and then sadly just shout at each other from opposite sides of the fence), but I just thought I’d share a few ideas to go along with yours.

  2. Hello Dmitry,
    first of all thank you for sharing the code. I was building an app that would show the image thumbnails on a ListView and wanted to use the windows thumbnail database for quick building the view. your app and the class is very close to what i need. I see that the GetImage function takes one parameter which is image index. My question is for a given file on the disk how can I retrieve the thumb nail from the thumb cache database.

    Thanks and regards,

  3. Dmitry,
    Thanks for sharing the code. It is quite eye opening to see that even though disc cleanup eliminates the thumbnails in the four numbered files (_32, _96, _256, _1024), it does not eliminate the thumbnails in the 4 Virtualized caches found here: C:\Users\User_Name\AppData\Local\Microsoft\Windows\Temporary_Internet_Files\Virtualize…

    Upon reading various tech pages, I thought these files were initially files from webpages, but none of them are. They are actually thumbs from my photos. Is there any way to remove those from the virtualize file?

    Thanks in advance!


Leave a Reply

Your email address will not be published. Required fields are marked *