Easily convert HEIC images to JPEG or PNG using a simple Dockerized Node.js application.
- Features
- Requirements
- Setup & Usage
- Environment Variables
- Folder Structure
- Example
- FAQ
- Author
- License
- Batch conversion: Converts all
.heic
files in the input folder - Format selection: Output as JPEG (with quality) or PNG
- Easy to use: Just copy your files and run a single command
- Containerized: No need to install dependencies on your system
- Place the
.heic
files you want to convert in the input/ folder (in the project root) - Ensure the output/ folder is empty or ready to receive converted files
docker-compose up --build
docker-compose up
docker-compose run --rm heic-converter
docker-compose run --rm -e FORMAT=PNG -e QUALITY=80 heic-converter
docker-compose run --rm -e INPUT_DIR=/app/myinput -e OUTPUT_DIR=/app/myoutput heic-converter
Variable | Description | Default |
---|---|---|
FORMAT | Output format: 'JPEG' or 'PNG' | 'JPEG' |
QUALITY | JPEG quality (1-100, JPEG only) | 90 |
INPUT_DIR | Input folder inside container | /app/input |
OUTPUT_DIR | Output folder inside container | /app/output |
heic-converter/
├── docker-compose.yaml
├── dockerfile
├── package.json
├── README.md
├── input/ # Place your .heic files here
├── output/ # Converted files will appear here
└── heic-converter/
└── src/
├── index.js
└── heic-converter.js
- Copy your
.heic
files into input/ - Run:
docker-compose run --rm heic-converter
- Find the converted files in output/
Where are my files?
- Input:
input/
(host) →/app/input
(container) - Output:
output/
(host) ←/app/output
(container)
Can I convert PNG?
Yes, set FORMAT=PNG
as an environment variable.
How do I set quality?
Use QUALITY=XX
(only for JPEG).
- Made with ❤️ by Emilz
MIT License