Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Optimize Images & SVGsNew to Visual Studio Code? Get it now.
Optimize Images & SVGs

Optimize Images & SVGs

Puru Kulshreshtha

|
25 installs
| (1) | Free
Convert PNG/JPG to WebP & AVIF, optimize SVGs with quality control
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Optimize Images & SVGs

A powerful VS Code extension to convert images to modern formats (WebP & AVIF) and optimize SVG files with customizable quality settings.

Features

  • 🖼️ Convert Images: Transform PNG, JPG, and JPEG images to WebP and AVIF formats
  • 🎨 Optimize SVGs: Compress SVG files with quality-based optimization
  • 📁 Batch Processing: Convert entire folders of images or SVGs at once
  • ⚙️ Quality Control: Adjust quality from 1-100 for precise file size control
  • 📊 Compression Stats: See before/after file sizes and compression percentages
  • 💾 Smart Memory: Remembers your last quality setting

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Image WebP & AVIF Converter"
  4. Click Install

Usage

Convert Single Image

  1. Right-click on a PNG, JPG, or JPEG file in the Explorer
  2. Select "Convert Image to WebP & AVIF"
  3. Enter desired quality (1-100)
  4. Converted files will be created in the same directory

Convert Folder Images

  1. Right-click on a folder in the Explorer
  2. Select "Convert Folder Images to WebP & AVIF"
  3. Enter desired quality (1-100)
  4. All PNG, JPG, and JPEG files will be converted

Optimize SVG

  1. Right-click on an SVG file in the Explorer
  2. Select "Optimize SVG"
  3. Enter desired quality (1-100, higher = more detail preserved)
  4. Optimized file will be created with .optimized.svg suffix

Optimize Folder SVGs

  1. Right-click on a folder in the Explorer
  2. Select "Optimize Folder SVGs"
  3. Enter desired quality (1-100)
  4. All SVG files in the folder will be optimized

Quality Guidelines

For Images (WebP & AVIF)

  • 90-100: Excellent quality, larger files
  • 80-89: High quality, good balance (recommended)
  • 60-79: Medium quality, smaller files
  • 1-59: Low quality, smallest files

For SVGs

  • 70-100: Preserves most details, minimal compression
  • 40-69: Balanced optimization, good compression
  • 1-39: Aggressive optimization, maximum compression

Configuration

You can set a default quality in VS Code settings:

{
  "imageConverter.quality": 80
}

Output Files

  • WebP: filename.webp (modern, excellent compression)
  • AVIF: filename.avif (cutting-edge, best compression)
  • Optimized SVG: filename.optimized.svg (reduced file size)

Requirements

  • VS Code 1.85.0 or higher
  • No external dependencies required - everything works out of the box!

Extension Commands

This extension contributes the following commands:

  • imageConverter.convertImage: Convert Image to WebP & AVIF
  • imageConverter.convertFolder: Convert Folder Images to WebP & AVIF
  • imageConverter.optimizeSvg: Optimize SVG
  • imageConverter.optimizeSvgFolder: Optimize Folder SVGs

Known Issues

  • Original files are preserved (not deleted)
  • If output files already exist, they will be skipped

Release Notes

1.0.0

Initial release of Image WebP & AVIF Converter

  • Convert PNG, JPG, JPEG to WebP and AVIF
  • Optimize SVG files with quality control
  • Batch processing for folders
  • Real-time compression statistics
  • Quality setting memory

Contributing

Found a bug or have a feature request? Please open an issue on GitHub.

License

MIT

Support

If you find this extension helpful, please consider:

  • ⭐ Starring the repository
  • 📝 Leaving a review on the marketplace
  • 🐛 Reporting bugs or suggesting features

Enjoy! 🎉



### LICENSE (MIT License)

MIT License

Copyright (c) 2025 Puru Kulshreshtha

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft