This extension uses the API provided byTinyPNG to compress your JP(E)G and PNG images directly inside VSCode!
Inside the file explorer, use the entry in the context menu to compress a single file.
As an addition to compress single files you can also compress all images inside a complete folder — including subfolders — aswell!
Select a folder and press the corresponding TinyPNG context menu entry.
You need to have an active TinyPNG API key, which you can find in your TinyPNG Developer Dashboard. You can provide the API key in your settings, see below.
!!!Be aware of TinyPNG API's pricing model! All compressions you do via this extension are counting in your account's compression count! You can see your currently and monthly compression count via command you can see below or inside the dashboard!!!
This extension contributes the following settings:
tinypng.apiKey: Your own TinyPNG API Keytinypng.forceOverwrite: Force the extension to overwrite the source file with the compressed one.tinypng.compressedFilePostfix: Postfix string that is appended to the compressed file, unless forceOverwrite is enabled. (default: ".min")
Currently not supported API features are:
- Image resizing
- Preserving metadata
- Saving compressed images to Amazon S3.
Note: This extension uses the TinyPNG own NodeJS Tinify API client. Thus issues you might notice in the extension are actual issues of this library.
Release notes can be found in the changelog.
This project uses an automated release workflow powered by GitHub Actions.
The extension uses semantic versioning based on Conventional Commits:
-
Make commits using conventional commit format:
feat:- New features (bumps minor version)fix:- Bug fixes (bumps patch version)feat!:orBREAKING CHANGE:- Breaking changes (bumps major version)
-
Trigger the release workflow:
- Go to GitHub Actions > Release workflow
- Click "Run workflow"
- Select branch and options
- The workflow will automatically:
- Determine version bump from commits
- Update
package.jsonandCHANGELOG.md - Create Git tag
- Publish to VS Code Marketplace
- Create GitHub Release
For detailed documentation, see Release Workflow Guide.
If needed, you can still release manually:
vsce loginvsce publish- Update changelog:
conventional-changelog -p angular -i CHANGELOG.md -s
Enjoy!