IMAGENES 2.1.0
Batch-converts and resizes images to WEBP, AVIF, JPG, PNG and more. Reads iPhone HEIC photos and never touches the originals.
[!] Command-line tool · Open source · MIT · Windows / Linux / macOS
A real run
This is the literal output of converting three photos with the web preset, in the same colours it prints in the console.
PS C:\fotos> imagenes . --preset web========================================================== IMAGENES 2.1.0==========================================================---------------------------------------------------------- RESUMEN Imagenes: 3 -> 12 archivos de salida Formatos: WEBP, AVIF Tamanos : medium, large---------------------------------------------------------- [ok] foto2.jpg (3000x2000) -> 4 archivo(s) [ok] foto1.jpg (3000x2000) -> 4 archivo(s) [ok] foto3.jpg (3000x2000) -> 4 archivo(s)========================================================== Listo. Imagenes: 3 Archivos creados: 12 Omitidos: 0 Errores: 0 Guardado en: C:\fotos\imagenes_convertidas Informe: reporte-20261103-005103.csv HTML <picture> listo para pegar: snippet.html==========================================================PS C:\fotos>
Build your command
The options are the ones in imagenes --help. Tick and copy.
imagenes C:\fotos -f webp,avif -s medium,large --metadatos limpiarAvailable presets:
- WEBP + AVIF at medium and large, no metadata. For publishing on the web.
formats: webp, avif sizes: medium, large - Product pages: square on a white background, in the 3 WooCommerce sizes.
formats: webp sizes: thumb, medium, large - A single WEBP at 1600 px. The fastest.
formats: webp sizes: large - Original size, quality 95, keeps metadata and colour profile.
formats: webp sizes: original
snippet.html
When it finishes it leaves the HTML ready to paste, with AVIF, WEBP and each image's exact size so the page does not jump while loading.
<!-- foto1.jpg -->
<picture>
<source type="image/avif" srcset="medium/foto1.avif 800w,
large/foto1.avif 1600w">
<source type="image/webp" srcset="medium/foto1.webp 800w,
large/foto1.webp 1600w">
<img src="large/foto1.webp" width="1600" height="1067" loading="lazy" decoding="async" alt="foto1">
</picture>
tests.yml
Every change runs pytest across this GitHub Actions matrix; tagging a version builds the .exe and publishes the release.
| py 3.10 | py 3.11 | py 3.12 | py 3.13 | |
|---|---|---|---|---|
| ubuntu-latest | [ok] | [ok] | [ok] | [ok] |
| windows-latest | [ok] | [ok] | [ok] | [ok] |
What is inside
- Guided wizard or direct mode for scripting, with presets and a watch mode.
- Parallel conversion with a memory ceiling and atomic writes.
- Hands you a ready-to-paste <picture> with srcset.
- Tested on Linux and Windows with Python 3.10 to 3.13, with automatic releases that ship an .exe.
Built with
- Python
- Pillow
- pytest
- GitHub Actions
- PyInstaller