An open API service indexing awesome lists of open source software.

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)

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.