This project provides a client-side tool for converting PNG and JPG images inside a ZIP archive into WEBP format. Along with the conversion, it allows users to add metadata like titles, author names, and descriptive phrases to the output files.
- Converts images in a ZIP archive (PNG, JPG, JPEG) to WEBP format.
- Adds metadata (e.g., image titles, photographer name, and SEO-friendly keywords) to the file names.
- Works entirely on the client-side; no data is sent to a server.
- Provides a user-friendly interface with progress updates.
- Automatically generates descriptive and unique file names.
- Upload a ZIP file containing PNG or JPG images.
- Fill out the input fields:
- Store Title: Adds a descriptive title to each image.
- Photo Author: Includes the photographer's name in the metadata.
- Phrases: Adds SEO-friendly keywords to the file names.
- Click Submit: The tool processes the ZIP file, converts the images to WEBP, and adds metadata.
- Download the Result: A new ZIP file containing the converted images is generated for download.
The output images will follow this naming convention:
<first_image_name>_<phrases>_<storeTitle>-AutoreFoto:<photoAuthor>_<uniqueId>.webp
For example:
image1_nature_sunset_MyStore-AutoreFoto:JohnDoe_1675648392347.webp
No installation required. Open the provided HTML file in a browser and start using the tool.
- Open the web page in a browser.
- Upload a ZIP file containing your images.
- Fill in the metadata fields:
- Store Title
- Photographer Name
- Keywords (comma-separated phrases for SEO)
- Submit the form and wait for the conversion to complete.
- Download the processed ZIP file.
-
processFiles(zipFile, storeTitle, photoAuthor, phrases)
- Handles the processing of files: extraction, conversion, metadata addition, and ZIP creation.
-
convertImagesInZip(zipFile, storeTitle, photoAuthor, phrases)
- Reads the ZIP file, converts images to WEBP format, and appends metadata to filenames.
-
convertToWebP(blob)
- Converts a single image file to WEBP format using a
<canvas>
element.
- Converts a single image file to WEBP format using a
-
createZipFromFiles(files)
- Creates a new ZIP file containing the converted images.
-
updateProgressBar(value)
- Updates the progress bar as images are processed.
-
downloadBlob(blob, filename)
- Triggers the download of the final ZIP file.
This project uses the zip.js library for ZIP file manipulation.
- Displays an alert if any required field is missing.
- Logs errors during file processing in the browser console.
Contributions are welcome! Please submit a pull request or open an issue to discuss potential changes or improvements.
- zip.js Library for ZIP file handling.
- Inspired by the need for a client-side, privacy-friendly image conversion tool.