3

Possible Duplicate:
Find Unused Resources in a .NET Solution

In a webapplication we have a lot of images and some of them are not used/referenced anymore. Is there way (tool or something) to get a list of all these unused files or/and delete them?

Community
  • 1
  • 1
S. Flart
  • 31
  • 2
  • 1
    I be it could be tricky to decide whether image is referenced somewhere or not. Let's imagine some js like: `$('img#foobar').attr('src', '/path' + '/to' + '/image.' + ext);` – zerkms Mar 21 '11 at 12:50
  • There is a free extension called Code Maid -- https://visualstudiogallery.msdn.microsoft.com/76293c4d-8c16-4f4a-aee6-21f83a571496 -- that will find unused images or files and will search everywhere including css and js files. – NickNo Feb 06 '15 at 09:02
  • There's an open-source VS extension that does that https://github.com/jitbit/vs-unused-image-finder (disclaimer: I'm a conributor!) – Alex from Jitbit Jan 18 '16 at 17:52

1 Answers1

3

A manual approach - If you have Resharper installed, you can right-click and choose "Find Usages" this will look in your project for a reference to the selected image.

Brian Schmitt
  • 6,008
  • 1
  • 24
  • 36