Cloudinary CLI for automatic image optimization, transformation, and asset management.
70
Cloudinary-powered image optimization CLI with Node.js wrappers for select Cloudinary Node.js APIs, covering automatic image optimization, transformation, and asset management.
Cloudinary's automatic optimization reduces the need to manually tune image dimensions, quality, compression, and formats. Unlike libraries such as Sharp or FFmpeg, where developers often need to experiment with processing parameters to find the right balance between visual quality and file size, Cloudinary can automatically optimize images for efficient delivery while preserving visual quality.
The result: less optimization guesswork, smaller assets, and better image delivery with less application-side processing.
GitHub Repository
https://github.com/weaponsforge/cloudinary-image
NPM Registry (Library)
https://www.npmjs.com/package/cloudinary-image
Pull the "latest" production image.
docker pull weaponsforge/cloudinary-cli
Create a .env file containing the following:
| Variable Name | Description |
|---|---|
| CLOUDINARY_NAME | Cloudinary account name |
| CLOUDINARY_API_KEY | Cloudinary API key |
| CLOUDINARY_API_SECRET | Cloudinary API secret |
weaponsforge/cloudinary-cli
-f /path/to/file.jpg # Full input image file path
-o /output/folder/path # (Optional) output folder
-a my-asset-folder # (Optional) Cloudinary asset folder
-t cars,vehicles,tech # (Optional) image tags
-w 600 # (Optional) width to resize the image. Default is 800
-u # (Optional) flag to upload the input image to Cloudinary. Required on 1st run.
-d # (Optional) flag to delete the uploaded image in Cloudinary
Optimize an image using the CLI, eg. using Bash:
docker run -it --rm \
--env-file ./path/to/.env \
-v /full/path/to/host/pictures/folder:/images \
weaponsforge/cloudinary-cli \
-f /images/<picture-file>.jpg \
-u -d
Optimize an image using the CLI with width specified, eg. using Bash:
docker run -it --rm \
--env-file ./path/to/.env \
-v /full/path/to/host/pictures/folder:/images \
weaponsforge/cloudinary-cli \
-f /images/<picture-file>.jpg \
-u -d -w 320
Content type
Image
Digest
sha256:cfa2f5f22…
Size
59.2 MB
Last updated
2 days ago
docker pull weaponsforge/cloudinary-cli