782-switch-off-thumbsds

How to Switch Off the Thumbs.db Image Cache File in Windows

By | | Operating systems | Programming | Usability

Apologies for the geeky article, but it solves a problem experienced by many web developers who use Windows as their primary OS. Thumbs.db is an image cache which makes thumbnail viewing faster. The file is automatically created in Windows Vista, 7 and 8 whenever images are encountered in a folder. It’s usually hidden but can appear, disappear and is often impossible to delete.

I understand the point of Thumbs.db, but that doesn’t prevent several irritations:

  • It affects version control. If you’re using a system such as TortoiseGit or TortoiseSVN, Thumbs.db will cause “changed” icon overlays to appear when you’ve not modified any files.
  • They often get uploaded to live servers where they’re pointless.
  • Unless you’ve got a slow PC, you probably won’t notice any speed improvement.
  • I don’t want auto-generated files cluttering my system, thank you!

Fortunately, there’s an easy way to prevent further Thumbs.db hassle:

  1. Ensure you’re logged in using an administrator account.
  2. Hit Win+R, type gpedit.msc in the Run window and click OK. The Local Group Policy Editor will be launched.
  3. Navigate through the tree to User Configuration > Administrative Templates > Windows Components > then either Windows Explorer (Windows Vista/7) or File Explorer (Windows 8).

    Local Group Policy Editor

  4. In the right-hand pane, double-click “Turn off the caching of thumbnails in hidden thumbs.db files”.
  5. Select Enabled (don’t make my mistake of choosing “Disabled” — you’re enabling the switching off of Thumbs.db. Not particularly intuitive, Microsoft!)

    Local Group Policy Editor

OK your way out and it’s job done — you’ll never be troubled by Thumbs.db files ever again!

Craig Buckler

Craig is a Director of OptimalWorks, a UK consultancy dedicated to building award-winning websites implementing standards, accessibility, SEO, and best-practice techniques.

More Posts - Website

{ 14 comments }

Dave February 1, 2013 at 3:12 am

Strangely my Win7 doesn’t create .thumbsdb files (I always have show hidden files on so it would be easy to see if it did). The only time I find them is in old folders or zips emailed to me. I do use QT tab bar, so maybe that overrides the default thumbnail creation process.

I have followed your instructions and enabled the disabling anyway just in case (before it was set at Not Configured).

Craig Buckler February 1, 2013 at 11:09 am

I enable viewing of hidden files, but often spot Windows 8 creating thumbs.db then removing it (although whether it actually goes is another matter).

Shane Goodman January 31, 2013 at 3:27 pm

The “Local Group Policy Editor” isn’t installed. I think this article only applies to those people whose machines are connected to a domain (at work).

Craig Buckler January 31, 2013 at 11:52 pm

I don’t think that’s the case – I’m using from a standard PC on a home network. Are you using a Home or Basic edition of Windows? See the registry alternative in the comments below…

Richard January 31, 2013 at 2:36 pm

So you chose “Disable” even though there was a helpful Help: panel there in front of you which explained this really not very confusing feature?
Don’t think as a Techno GeekAdviser that I would have mentioned that.
What is that acronym, RTFM??

Craig Buckler January 31, 2013 at 11:55 pm

So I should claim that I never make mistakes? I don’t care how much information is provided — clicking “Enable” to disable thumbs.db is not particularly obvious and it’s important to highlight it. I made the mistake and others will too.

Nicholas Johnson January 31, 2013 at 9:57 am

Yes, if you’re using git, just add the line: thumbs.db to your .gitignore file. On OSX you need: *.DS_Store instead.

David January 31, 2013 at 1:44 am

I have Windows 7 Home Premium, and the result I get when running gpedit is “MMC could not create the snap-in”.

What’s the relevant entry in the registry so I can change it using regedit instead?

Craig Buckler January 31, 2013 at 11:57 pm

HKEY_CURRENT_USER\
Software\
Microsoft\
Windows\
CurrentVersion\
Explorer\Advanced\
set DisableThumbnailCache to 1.

Please be careful in there!

Les January 30, 2013 at 11:58 pm

Well, my Windows says the file cannot be found? No shock there, half the …. time this Windows OS doesn’t work :(

mike ritter January 30, 2013 at 1:35 pm

My Windows machine was all buggered up until I did this a few months back.

Pete Wright January 30, 2013 at 1:03 pm

Nice, thanks Craig – it may be a relatively minor niggle, but it’s a persistent one.

Matt Walters January 30, 2013 at 12:38 pm

You could just add a rule in your “.gitignore” if you’re worried about it screwing with version-controlled directories, surely? As much as I hate the idea of cache files lurking in the shadows of every folder containing images, I do prefer having them enabled as it considerably speeds up viewing thumbnails of DSLR photos on my NAS (or other networked devices), especially when the images are over 10MB each!

Torrance Scott January 30, 2013 at 11:57 am

Nice! I might go ahead and look at some of the other options I didn’t know existed. Thanks!

Comments on this entry are closed.