AssetForge
Convert and optimize images directly inside your VS Code projects.
AssetForge is a local image conversion tool designed to help developers reduce image file sizes and update image references without leaving VS Code.
Features
- Convert a single image into WebP, AVIF, JPEG, or PNG.
- Batch convert images in a selected folder, including nested folders.
- Choose image quality for supported lossy output formats.
- Track conversion results with progress, file-size comparisons, and savings summaries.
- Update image references in supported project files, including JavaScript, TypeScript, JSX, TSX, HTML, CSS, SCSS, and Vue files.
- Protect original images by keeping them by default, with an optional deletion workflow that requires successful reference updating.
How to Use
- Open your project in VS Code.
- Open the Command Palette with
Ctrl+Shift+P.
- Run AssetForge: Convert Image to convert an individual image.
- Run AssetForge: Convert Folder to batch-convert images in a selected folder.
- Choose the desired output format and quality.
- Review the conversion summary when processing finishes.
To find image references, run AssetForge: Find Image References from the Command Palette.
Input: PNG, JPG, JPEG, WebP, AVIF, GIF, and TIFF.
Output: WebP, AVIF, JPEG, and PNG.
Quality settings are available for supported lossy formats. PNG conversion uses Sharp's PNG encoder settings.
Privacy
Image processing is performed locally by the extension. AssetForge does not require an AssetForge account or a dedicated remote conversion service.
Important Notes
- Batch conversion skips files whose output already exists rather than overwriting them.
- Reference updates are limited to the supported file types and reference patterns implemented by the extension.
- Review your project changes and test the application before deleting original images or committing converted assets.
- Native image-processing dependencies and operating-system compatibility must be verified for the packaged release.
Development
Install dependencies:
npm install
Compile:
npm run compile
Lint:
npm run lint
Run tests:
npm test
License
The project license has not yet been specified.