Last updated: Feb-07-2023
On this page:
Learn how to convert videos to animated image formats, such as AVIF, WebP and GIF, on the fly by adding transformation parameters to the delivery URL.
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Transform the video to a GIF
|0:05||You can change a video to an animated image format using the format parameter. For example, to transform an MP4 video to a GIF, specify
Reduce the file size
|0:24||Images in the GIF file format are, in general, very large. You can reduce the file size by changing the dimensions to suit the displayed image size. For example, scale the image to a width of 600 pixels using
Transform the video to a WebP
|1:03||Another way to reduce the file size is by changing the format to one that's more optimal, for example WebP. You can do this by adding
Use automatic format selection
|1:32||You can let Cloudinary return the optimal format, based on what is supported by the requesting browser, by using automatic format selection (
Loop the animated image
|2:06||Make your animated image play infinitely by setting it to repeat continuously with the loop effect (
- Watch more Dev Hints videos on the Cloudinary YouTube channel.
- Learn more about converting videos to animated images, including the pros and cons of different animated image formats.
- Discover what else you can do with animated images and how to create them from still images.
If you like this, you might also like...
Optimization TipsTips for delivering optimized images
Zoompan EffectApply the Ken Burns effect to zoom and pan on an image
Named TransformationsSimplify & standardize complex delivery URLs
Check out the 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.