Skip to main content

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

By Craig Buckler

Programming

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

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!

Comments on this article are closed. Have a question about Windows and Servers? Why not ask it on our forums?

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

New books out now!

Learn valuable skills with a practical introduction to Python programming!


Give yourself more options and write higher quality CSS with CSS Optimization Basics.