Image & Video APIs

Angular SDK

Last updated: Dec-11-2025

The Cloudinary Angular SDK provides simple, yet comprehensive image and video rendering, transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Angular application.

How would you like to learn?

Resource Description
Angular quick start Get up and running in five minutes with a walk through of installation, configuration, rendering, and transformations.
Sample projects Explore sample projects to see how to implement Cloudinary functionality such as rendering and delivery with transformations.
Cloudinary Angular SDK GitHub repo Explore the source code and see the frontend-frameworks and js-url-gen CHANGELOGS for details on all new features and fixes from previous versions.

Install

Install Cloudinary's JavaScript and Angular packages using the NPM package manager:

Note
To install special versions of Angular packages, for example release candidates (RC) or Beta versions, we advise using the --legacy-peer-deps flag.

Configure

Include Cloudinary's Angular and JavaScript classes in your code:

app.component.ts

Set required configuration parameters

You can set the required configuration parameter, cloudName, either when creating a Cloudinary instance or per asset.

Cloudinary instance configuration

If you want to use the same configuration to deliver all your media assets, it's best to set up the configuration through a Cloudinary instance, for example:

app.component.ts

In your view, add the advanced-image component and pass your Cloudinary image.

app.component.html

Note
If you're not using standalone components, then you'll need to import the CloudinaryModule in app.module.ts instead.

Asset instance configuration

If you need to specify different configurations to deliver your media assets, you can specify the configuration per image/video instance, for example:

app.component.ts

In your view, add the advanced-image component and pass your Cloudinary image.

app.component.html

Note
If you're not using standalone components, then you'll need to import the CloudinaryModule in app.module.ts instead.

Set additional configuration parameters

In addition to the required configuration parameters, you can define a number of optional configuration parameters if relevant.

Note
Specify all configuration parameters in camelCase, for example secureDistribution.

You can use the Cloudinary constructor to set configuration parameters, for example:

app.component.ts

Use

Once you've installed and configured the Angular SDK, you can use it for:

  • Transforming images - Render your images with transformations applied, using the advanced-image component. See examples
  • Transforming videos - Render your videos with transformations applied, using the advanced-video component. See examples
  • Optimizing delivery - Use plugins to improve your user's experience by automating media tasks like lazy loading, responsive images and more. See plugins

Quick examples: Image transformations

Here are two quick examples to get you started with image transformations:

Image transformation example 1

The following Angular code renders the front_face.jpg image with a sepia effect applied:

app.component.ts

app.component.html

Note
If you're not using standalone components, then you'll need to import the CloudinaryModule in app.module.ts instead.

This code creates the HTML required to render the following transformation URL:

Sample image transformation

Image transformation example 2

You can apply more than one transformation at a time (see chained transformations) to give more interesting results (notice how you import only the actions and qualifiers that you need, to minimize your bundle size):

Sample image transformation

This relatively simple code performs all of the following on the original front_face.jpg image before delivering it:

  • Crop to a 150x150 thumbnail using face-detection gravity to automatically determine the location for the crop
  • Round the corners with a 20 pixel radius
  • Apply a sepia effect
  • Overlay the Cloudinary logo on the southeast corner of the image (with a slight offset). Scale the logo overlay down to a 50 pixel width, with increased brightness and partial transparency (opacity = 60%).
  • Rotate the resulting image (including the overlay) by 10 degrees
  • Optimize the image to reduce the size of the image without impacting visual quality.
  • Convert and deliver the image in PNG format (the originally uploaded image was a JPG)

And here's the URL that's automatically generated and rendered from the above code:

The @cloudinary/url-gen package installs an additional transformation-builder-sdk library as a dependency, which handles the transformation generation part of the URL.

You can use the Transformation Builder reference to find all available transformations, syntax and examples.

Tip

There are alternative ways to apply transformations to your images, for example:

Learn more about image transformations

Quick examples: Video transformations

Here are two quick examples to get you started with video transformations:

Video transformation example 1

The following Angular code renders the ship.mp4 video with a brightness adjustment applied:

app.component.ts

app.component.html

Note
If you're not using standalone components, then you'll need to import the CloudinaryModule in app.module.ts instead.

This code creates the HTML required to render the following transformation URL:

Video transformation example 2

You can apply more than one transformation at a time (see chained transformations) to give more interesting results (notice how you import only the actions and qualifiers that you need, to minimize your bundle size):


This relatively simple code performs all of the following on the original ship.mp4 video before delivering it:

  • Crop to a 1:1 aspect ratio (square) with a width of 300 pixels, using automatic gravity to determine the focal point
  • Apply a blur effect with strength 50
  • Apply maximum rounding to create a circular video

And here's the URL that's automatically generated and rendered from the above code:

Similar to image transformations, there are alternative ways to apply transformations to your videos.

Learn more about video transformations

Plugins

The Cloudinary Angular SDK provides plugins to render the media on your site in the optimal way and improve your user's experience by automating media tasks like lazy loading, responsive images and more.

Learn more about plugins

Sample projects

Take a look at the Angular sample projects page to help you get started integrating Cloudinary into your Angular application.

Tip
Check out our collection of Angular code explorers too!

Related topics

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars