Programmable Media

Transformation overlays (video tutorial)

Last updated: Jul-19-2024


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

Jump to this spot in the video  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

Jump to this spot in the video  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

Jump to this spot in the video  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

If you like this, you might also like...

Transformation Basics
Learn the basics of a transformation URL
Gravity Crops for Images
Indicate which areas to keep when cropping
Complex Transformations
Combine transformations to generate a 3D canvas


Cloudinary Academy


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.


✔️ Feedback sent!

Rate this page: