https://github.com/redstonecraftgg/webpcon
A simple tool for mass converting images (JPG, PNG, BMP, GIF, TIFF) to WebP in project folders. (Best use for React projects)
https://github.com/redstonecraftgg/webpcon
converter go golang image react reactjs-components vite vitejs vitejs-react webp
Last synced: 8 months ago
JSON representation
A simple tool for mass converting images (JPG, PNG, BMP, GIF, TIFF) to WebP in project folders. (Best use for React projects)
- Host: GitHub
- URL: https://github.com/redstonecraftgg/webpcon
- Owner: RedStoneCraftGG
- License: other
- Created: 2025-07-13T14:05:31.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-07-14T11:15:58.000Z (8 months ago)
- Last Synced: 2025-07-14T14:50:40.922Z (8 months ago)
- Topics: converter, go, golang, image, react, reactjs-components, vite, vitejs, vitejs-react, webp
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebP Converter
A simple tool for mass converting images (JPG, PNG, BMP, GIF, TIFF) to WebP in project folders. It supports automatic backup of original files and a revert feature (restoring original files from backup).
I use it for mass conversion of my project files (mostly Vite and React.js). Instead of discarding them, it's better to keep them.
## Main Features
- Converts all images in the folder to WebP (including subfolders)
- Automatically backs up original files to .webpcon_backup
- Revert feature: restores original files and deletes WebP files
- Supports Windows & Linux (cross-platform)
## Installation
Make sure to install GCC (MinGW) or similar before building!
### Windows
```
go mod tidy
go build -o webcon.exe main.go
```
or run `build.bat`
### Linux
```sh
go mod tidy
go build -o webcon main.go
```
or run `build.sh`
## Usage
### Convert to WebP
```
webcon
```
### Revert
```
webcon revert
```
*Note*: Backup files will be saved in `.webcon_backup`
## Known Issue
For the `.gif` format, it will be converted to a static image on the first frame. If you wish to convert it to an animated WebP anyway, use `--gif`, but I would not recommend it due to the limitations of the go-native library.