Remove unused images, icons, and other static assets from your project effortlessly.
This Visual Studio Code extension helps you find and delete unused static assets (e.g., images in the public
folder of a Next.js app) that are no longer referenced in your source code. It helps keep your project clean and lightweight.
- ✅ Automatically scans your
public
or custom assets folder. - ✅ Detects references to assets across your codebase.
- ✅ Supports JavaScript, TypeScript, HTML, JSON, CSS files, and more.
- ✅ Lets you preview and select unused files before deleting them.
- ✅ Ignores system and build folders (
node_modules
,.git
,.next
, etc.). - ✅ Fully configurable via input prompts.
You're working on a Next.js project and have accumulated many images in the public/images
folder. Some of them are no longer used in the code. Instead of manually checking and deleting them, you can:
- Run this extension.
- Let it analyze your project.
- Select the unused assets you want to delete.
- Clean your codebase — in seconds.
- Open your project folder in VS Code.
- Open the Command Palette (Press
Ctrl+Shift+P
orCmd+Shift+P
). - Search and run:
Unused Assets Remover: Clean Up Assets
- Follow the prompts:
- Enter the path to your assets folder (e.g.,
public
,public/images
). - Provide a search prefix (e.g.,
/
for/image.png
,/images
for/images/photo.jpg
). - Optionally, define folders to ignore (e.g.,
node_modules,.git
).
- Enter the path to your assets folder (e.g.,
- Select which unused files to delete.
- Confirm and enjoy a cleaner project! ✨
.js
,.jsx
.ts
,.tsx
.html
.json
.css
This extension only scans and modifies files within your workspace folder. No external calls or telemetry.
- Works great with Next.js and other web frameworks that serve static files.
- Make sure your dynamic asset references (like via JavaScript variables or Next.js
Image
components with dynamicsrc
) are correctly handled or excluded manually.
- Visual Studio Code
- Node.js (required for development only)
Q: Can it delete assets inside nested folders?
Yes, the scan is recursive and includes all subfolders inside the specified asset directory.
Q: Is it safe to use?
Yes! You can preview and manually select which unused files to delete. No automatic deletions.
Q: Is this extension free?
Absolutely.
Feel free to open issues or PRs to improve detection logic, add support for more file types, or improve performance.
MIT License
Enjoy a cleaner, lighter codebase! 🌿