Scripting with the CLI (video tutorial)
On this page:
Overview
Watch this tutorial to learn how to create an animated GIF using a Cloudinary CLI script.
Video tutorial
Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Create an animated GIF with an image and a script
You can create an animated GIF that transforms the color saturation of an image. Begin with an image and a script. |
Create a script
In the script, increase the color saturation of an image and upload the image with the applied transformation. |
Here is the script:
#!/bin/bash inc=10 # Increase the color saturation by 10 for each image for ((sat = -100; sat <= 100; sat += 10)) do trans="transformation='{\"effect\": \"saturation:$sat\"}'" echo $trans # Upload the image with the applied transformation eval cld uploader upload umbrellas.jpg public_id="umbrellas_$inc" folder="color" overwrite=true tags="umbrella" $trans ((inc++)) done cld uploader multi umbrella delay=100
Run the script
Run the script to upload the image multiple times and increase the color saturation each time, giving each image a different public ID but the same tag. |
Apply a command to create the animation
Use the multi command to create the animation:cld uploader multi umbrella delay=100 |
View your animated GIF
Copy and paste the generated URL to view your animated GIF. |
Keep learning
Related topics
- Learn more in the Cloudinary CLI Reference.
- Read about the Cloudinary CLI in this blog post.
If you like this, you might also like...
Check out Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
✖️