Last updated: Sep-12-2024
On this page:
Overview
Watch this tutorial to learn how to add overlays to assets on the fly using the Node.js SDK. See how to place the overlays and resize and adjust them to your preference.
Video tutorial
View the code
You can find the code from this tutorial in GitHub.Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Overlay images with Cloudinary
0:04 | You can add overlays on the fly with Cloudinary by including the overlay transformation parameters in the delivery URL. You can do this in the Node.js SDK for example, by adding overlay: 'examples:cat' to the transformation property when defining the URL to add an overlay of a cat image. |
Adjust overlay size
1:03 | You can adjust the dimensions of the overlay you add, for example adding width: 100, height: 100 to reduce the size. |
Use gravity to position the overlay
1:45 | You can also use the gravity parameter to set where to place the overlay on the image, for example setting gravity: 'north_east' to place the overlay in the top right corner. |
Keep learning
Related topics
- Watch more Dev Hints videos on the Cloudinary YouTube channel.
- Learn more about adding layers to images and videos.
- Discover more transformations in the Transformation URL API reference.
If you like this, you might also like...
Transformation Basics
Learn the basics of a transformation URLGravity Crops for Images
Indicate which areas to keep when croppingComplex Transformations
Combine transformations to generate a 3D canvas
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.
✖️