Images are often the heaviest assets on a web page—and also one of the easiest places to leave performance on the table. You can spend days trimming JavaScript bundles, splitting routes, and tuning change detection in Angular, only to ship a single unoptimized multi-megabyte hero image that stalls your Largest Contentful Paint on a mobile connection.
When I joined the Cloudinary Creators program, I wanted to go beyond reading documentation and writing isolated snippets. I wanted a place where developers could actually see what happens when you switch formats, compare q_auto:best against q_auto:eco at 400% zoom, inspect real downloaded byte counts in the browser, and copy Angular integration examples in one click.
That idea became Cloudinary Image Lab ("Less weight. Same impact."), an open-source, MIT-licensed interactive playground built with Angular 22, Angular Signals, Cloudinary, and Tailwind CSS 4. Both the application and this guide are part of my Build & Share and Write & Share milestones in Cloudinary Creators.
In this guide, I'll walk through the fundamentals of image optimization, how Cloudinary's URL-based transformation pipeline works, how to integrate it cleanly with Angular 22, and the architectural decisions behind Cloudinary Image Lab—including how the app measures real image payload sizes in the browser.
Table of Contents
- Why Image Optimization Matters
- Understanding Cloudinary and the Delivery Pipeline
- Integrating Cloudinary with Angular 22
- Image Optimization Fundamentals: f_auto and q_auto
- Safe Resizing and Responsive Delivery
- Building Cloudinary Image Lab
- Measuring Real Optimization Results
- Comparing Visual Quality
- Developer Tools and Responsive Preview
- Interactive Bilingual Documentation
- Security and Performance Best Practices
- Lessons Learned
- Live Demo and Source Code
- Final Thoughts
- References
Why Image Optimization Matters
Unoptimized images affect user experience across three core areas:
- Largest Contentful Paint (LCP): On many landing pages, product pages, and articles, the largest above-the-fold element is an image. According to web.dev's Core Web Vitals guidelines, a good LCP should occur within 2.5 seconds of when the page starts loading. Delivering an oversized, poorly compressed hero asset delays how quickly that element downloads, decodes, and paints.
-
Cumulative Layout Shift (CLS): When an
<img>renders without explicit dimensions or a reserved aspect ratio, the browser cannot reserve its vertical space until the image dimensions are known, causing surrounding text and buttons to jump. A good CLS score is 0.1 or less (web.dev CLS guide). - Bandwidth Consumption: Every unnecessary kilobyte consumes user data—especially on mobile networks—and can increase CDN and origin egress costs.
Even outside a CDN pipeline, format selection alone can produce substantial savings. While preparing the screenshots for this article, I converted 13 PNG screenshots locally to lossless WebP (performed locally, not through Cloudinary):
| Format | Total Size (13 Screenshots) | Space Saved | Reduction |
|---|---|---|---|
| PNG | 2.61 MB | — | — |
| WebP (lossless) | 1.37 MB | 1.24 MB | 47.5% |
Saving 1.24 MB across 13 screenshots without any lossy compression highlights how much overhead legacy formats can introduce. Automating format negotiation, perceptual compression, and responsive resizing on the fly extends those benefits across every device and browser.
Understanding Cloudinary and the Delivery Pipeline
Manually pre-generating multiple formats across multiple screen widths for every asset in a repository quickly becomes unmanageable. Cloudinary addresses this with a URL-based transformation API backed by a global Content Delivery Network (CDN).
Instead of storing dozens of static derivatives, you store a single source asset and describe the desired transformations directly in the delivery URL:
https://res.cloudinary.com/<cloud_name>/image/upload/<transformations>/<public_id>
From Source to Screen: The Delivery Pipeline
When a browser requests a transformed Cloudinary URL, the request flows through four stages:
Source image ──▶ Transformation ──▶ Cloudinary CDN ──▶ User device
- Source image: The original asset remains untouched in Cloudinary storage.
- Transformation: On the first request for a given transformation URL, Cloudinary parses the parameters (resizing, format, quality, and more), generates the derived image on the fly, and strips most non-essential metadata by default (Cloudinary Image Optimization docs).
- Cloudinary CDN: The derived asset is cached at CDN edge locations close to users so subsequent requests for that URL are served directly from cache.
- User device: The browser receives a right-sized, modern-format image suited to its capabilities.
In Cloudinary's URL syntax, commas separate parameters within a single transformation component, while slashes separate chained components. Per Cloudinary's Transformation Rules, automatic format and quality can be placed in separate slash-delimited components—f_auto/q_auto rather than f_auto,q_auto:
https://res.cloudinary.com/demo/image/upload/c_limit,w_800/f_auto/q_auto/sample
Integrating Cloudinary with Angular 22
Cloudinary provides two official packages for Angular projects (Cloudinary Angular SDK docs):
-
@cloudinary/url-gen: A framework-agnostic, tree-shakable URL builder for constructing type-safe transformation URLs. -
@cloudinary/ng: Angular bindings providingCloudinaryModuleand the<advanced-image>component, along with delivery plugins.
Installation
Install both packages using pnpm or npm:
pnpm add @cloudinary/url-gen @cloudinary/ng
npm install @cloudinary/url-gen @cloudinary/ng
Centralizing Configuration with an InjectionToken
In Cloudinary Image Lab, runtime configuration is typed via CloudinaryRuntimeConfig (src/app/core/config/cloudinary.config.ts) and provided through the CLOUDINARY_CONFIG InjectionToken (src/app/core/tokens/cloudinary-config.token.ts), backed by src/environments/environment.ts and src/environments/environment.prod.ts:
import { InjectionToken } from '@angular/core';
export interface CloudinaryRuntimeConfig {
readonly cloudName: string;
readonly secure: boolean;
readonly deliveryBaseUrl: string;
}
export const CLOUDINARY_CONFIG = new InjectionToken<CloudinaryRuntimeConfig>(
'CLOUDINARY_CONFIG'
);
Register the provider in app.config.ts:
import { ApplicationConfig } from '@angular/core';
import { CLOUDINARY_CONFIG } from './core/tokens/cloudinary-config.token';
import { environment } from '../environments/environment';
export const appConfig: ApplicationConfig = {
providers: [
{
provide: CLOUDINARY_CONFIG,
useValue: environment.cloudinary,
},
],
};
Building a Tree-Shakable Cloudinary Service
With @cloudinary/url-gen, you import only the specific actions and qualifiers you need. Here is a simplified service illustrating the integration pattern:
import { Injectable, inject } from '@angular/core';
import { Cloudinary, CloudinaryImage } from '@cloudinary/url-gen';
import { format, quality } from '@cloudinary/url-gen/actions/delivery';
import { limitFit } from '@cloudinary/url-gen/actions/resize';
import { auto as autoFormat } from '@cloudinary/url-gen/qualifiers/format';
import { auto as autoQuality } from '@cloudinary/url-gen/qualifiers/quality';
import { CLOUDINARY_CONFIG } from '../../../core/tokens/cloudinary-config.token';
@Injectable({ providedIn: 'root' })
export class CloudinaryService {
private readonly config = inject(CLOUDINARY_CONFIG);
private readonly cld = new Cloudinary({
cloud: { cloudName: this.config.cloudName },
url: { secure: this.config.secure },
});
buildOptimizedImage(publicId: string, maxWidth?: number): CloudinaryImage {
const img = this.cld.image(publicId);
if (maxWidth) {
img.resize(limitFit().width(maxWidth));
}
return img
.delivery(quality(autoQuality()))
.delivery(format(autoFormat()));
}
}
Rendering with Standalone Components and Angular Signals
Pairing Angular Signals (input(), computed()) with <advanced-image> from @cloudinary/ng keeps image rendering reactive and clean:
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
import { CloudinaryModule } from '@cloudinary/ng';
import { CloudinaryService } from './cloudinary.service';
@Component({
selector: 'app-optimized-photo',
standalone: true,
imports: [CloudinaryModule],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<advanced-image
[cldImg]="cldImage()"
[alt]="alt()"
class="block h-auto w-full rounded-lg"
/>
`,
})
export class OptimizedPhotoComponent {
private readonly cloudinary = inject(CloudinaryService);
readonly publicId = input.required<string>();
readonly alt = input.required<string>();
readonly maxWidth = input<number>(800);
readonly cldImage = computed(() =>
this.cloudinary.buildOptimizedImage(this.publicId(), this.maxWidth())
);
}
Note: If you prefer Angular's built-in
NgOptimizedImagedirective for standard responsive templates and LCP priority hints, Angular also providesprovideCloudinaryLoader. In Cloudinary Image Lab, I use@cloudinary/url-gendirectly inside the workbench so users can toggle individual transformation parameters dynamically and inspect the exact resulting URLs, while offering<advanced-image>snippets in Developer Tools.
Image Optimization Fundamentals: f_auto and q_auto
Selecting the right format and compression level is a balance between file weight, visual fidelity, and browser compatibility.
Automatic Format Selection with f_auto
No single image format wins in every scenario. Each format brings different strengths depending on image content and client support:
| Format | Compression | Transparency | Browser Support | Typical Strengths |
|---|---|---|---|---|
| JPEG | Lossy | No | Universal | Broad compatibility for photographic content |
| PNG | Lossless | Yes | Universal | Exact pixel preservation for graphics, icons, and sharp edges |
| WebP | Lossy & Lossless | Yes | Modern browsers | Strong balance of file size, decoding speed, and wide modern support |
| AVIF | Lossy & Lossless | Yes | Modern browsers (newer) | Often achieves high compression efficiency on photographic imagery, though optimal format varies by image content and settings |
Hardcoding a single modern format can either break older clients or miss better options on newer ones. Even between WebP and AVIF, the smallest output depends on the specific image's texture, resolution, color depth, and encoding settings—AVIF is frequently smaller for complex photos, but it is not universally the smallest choice for every asset.
Adding f_auto instructs Cloudinary to inspect the client's Accept request header and automatically deliver an optimal format supported by that browser—such as AVIF, WebP, or JPEG XL where supported, falling back to JPEG or PNG when appropriate (Cloudinary Image Optimization docs).
import { format } from '@cloudinary/url-gen/actions/delivery';
import { auto as autoFormat } from '@cloudinary/url-gen/qualifiers/format';
const img = cld
.image('samples/landscapes/nature-mountains')
.delivery(format(autoFormat()));
// Generated URL:
// https://res.cloudinary.com/demo/image/upload/f_auto/samples/landscapes/nature-mountains
Intelligent Compression with q_auto
Picking a fixed numeric quality like q_70 applies the same compression aggressiveness to every image regardless of content. A detailed architectural photograph with crisp lines reacts very differently to compression than a soft sky gradient.
Cloudinary's q_auto uses perceptual analysis to choose a compression level tailored to each image, and provides four presets to tune the trade-off between visual fidelity and byte size:
| Parameter | Compression Goal | Typical Use Case |
|---|---|---|
q_auto (default) |
Balanced visual quality and file size | General-purpose default across most pages |
q_auto:best |
Higher visual fidelity with more conservative compression | Hero visuals, product close-ups, photography showcases |
q_auto:good |
Balanced quality and weight (matches default q_auto behavior) |
Editorial imagery, cards, standard content images |
q_auto:eco |
Stronger compression favoring smaller payloads | Dense galleries, thumbnails, secondary visuals |
q_auto:low |
Aggressive compression prioritizing minimum file size | Low-bandwidth previews or non-critical imagery |
With @cloudinary/url-gen:
import { quality } from '@cloudinary/url-gen/actions/delivery';
import {
auto as autoQuality,
autoBest,
autoGood,
autoEco,
autoLow,
} from '@cloudinary/url-gen/qualifiers/quality';
cld.image('sample').delivery(quality(autoQuality())); // q_auto
cld.image('sample').delivery(quality(autoBest())); // q_auto:best
cld.image('sample').delivery(quality(autoGood())); // q_auto:good
cld.image('sample').delivery(quality(autoEco())); // q_auto:eco
cld.image('sample').delivery(quality(autoLow())); // q_auto:low
Always inspect critical visuals directly rather than assuming a single preset works everywhere—perceived quality varies significantly depending on subject matter, contrast, and display size.
Safe Resizing and Responsive Delivery
Format and quality optimization cannot fix serving a 2400px-wide image into a 400px card. Delivering oversized pixels wastes both network bandwidth and client decoding time.
Safe Downscaling with c_limit
For width constraints, c_limit (limitFit()) is a reliable default:
- It scales the image down to fit within the target width while preserving its original aspect ratio.
- It never upscales an image that is already narrower than the requested width, preventing unnecessary bloat and softness (Cloudinary Transformation Rules).
import { limitFit } from '@cloudinary/url-gen/actions/resize';
img.resize(limitFit().width(800));
// Produces: c_limit,w_800
Responsive Images with srcset, sizes, and Device Pixel Ratio (DPR)
HTML provides native attributes that let the browser pick the right image width for each viewport and screen density (MDN Responsive Images Guide):
-
srcsetlists candidate URLs alongside their width descriptors (320w,640w,800w,1280w,1920w). -
sizestells the browser how wide the image slot will be rendered at different media conditions. -
Device Pixel Ratio (DPR): The browser multiplies the matched
sizesslot width by the device's DPR before choosing a candidate fromsrcset. For example, a400pxslot on a2xdisplay leads the browser to look for an800wcandidate.
In Cloudinary Image Lab, RESPONSIVE_CANDIDATE_WIDTHS in src/app/features/image-lab/models/transformation.model.ts defines the five breakpoints [320, 640, 800, 1280, 1920], and CloudinaryService.buildSrcSet() generates c_limit,w_* candidates. The simplified example below assumes a source image at least 800 pixels wide with an approximately 3:2 aspect ratio and uses three candidates:
<img
src="https://res.cloudinary.com/demo/image/upload/c_limit,w_800/f_auto/q_auto/sample"
srcset="
https://res.cloudinary.com/demo/image/upload/c_limit,w_320/f_auto/q_auto/sample 320w,
https://res.cloudinary.com/demo/image/upload/c_limit,w_640/f_auto/q_auto/sample 640w,
https://res.cloudinary.com/demo/image/upload/c_limit,w_800/f_auto/q_auto/sample 800w
"
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 800px"
width="800"
height="533"
loading="lazy"
decoding="async"
alt="Responsive optimized sample image"
/>
Important detail about
c_limitand width descriptors: Becausec_limitnever upscales, if a source image is only864pxwide, requestingc_limit,w_1280orc_limit,w_1920will still return an864px-wide image. In production, make sure yoursrcsetwidth descriptors match the actual delivered widths—or filter out candidates wider than your source image's intrinsic width—so the browser's selection math remains accurate.
Lazy Loading and LCP
- Add
loading="lazy"to below-the-fold images so offscreen assets don't compete with critical startup resources. - Keep above-the-fold LCP hero images eager (omit
loading="lazy") and considerfetchpriority="high". - Always specify
widthandheight(or CSSaspect-ratio) to prevent layout shifts.
Building Cloudinary Image Lab
To put all of these concepts into an interactive, reproducible environment, I built Cloudinary Image Lab.
Tech Stack
| Layer | Packages & Versions |
|---|---|
| Framework | Angular ^22.3.0 (@angular/core, @angular/common, @angular/router, @angular/forms, @angular/build, @angular/cli), Standalone Components, Angular Signals |
| Language | TypeScript ~6.0.2, RxJS ~7.8.2
|
| Media Optimization |
@cloudinary/url-gen ^1.22.0, @cloudinary/ng ^2.1.6
|
| Styling & Typography | Tailwind CSS ^4.3.5 (@tailwindcss/postcss ^4.3.5), @fontsource-variable/geist ^5.3.0, @fontsource-variable/geist-mono ^5.3.0
|
| UI & Visuals |
@lucide/angular ^1.78.0, shiki ^4.6.0, ogl ^1.0.11 (WebGL Dark Veil background on the home page) |
| Testing & Tooling |
vitest ^3.2.4, jsdom ^26.1.0, pnpm (pnpm-lock.yaml, pnpm-workspace.yaml), Vercel |
I chose a minimalist, monochromatic interface so the images under inspection—and any subtle compression differences—remain the visual focal point. The app also supports English and Spanish via a custom Signal-based LanguageService (src/app/core/services/language.service.ts) that dynamically loads public/i18n/en.json and public/i18n/es.json, updates document.documentElement.lang, <title>, and <meta name="description">, and includes key-parity verification in language.service.spec.ts.
Project Architecture
The application uses a feature-oriented folder structure under src/app/:
src/app/
├── core/ # CLOUDINARY_CONFIG token, CloudinaryRuntimeConfig, demo assets, LanguageService, ToastService
├── layouts/
│ └── main-layout/ # Persistent shell (skip-to-content link, sticky header, <router-outlet>, footer, toasts)
├── shared/ # Domain-agnostic UI primitives (button, skeleton, tooltip, toast, language-switcher, TranslatePipe)
└── features/
├── home/ # Landing page with OGL Dark Veil WebGL background and capabilities grid
├── image-lab/ # Self-contained workbench: models, utils, services, page-scoped store, and 10 components
└── documentation/ # Bilingual interactive technical documentation
All workbench components—code-playground, dimension-selector, format-selector, image-comparator, image-gallery, optimization-metrics, quality-selector, responsive-preview, transformation-controls, and url-preview—are standalone: true components using ChangeDetectionStrategy.OnPush, input(), signal(), computed(), inject(), and DestroyRef.
Interactive Transformation Controls and Demo Asset Gallery
The workbench includes a Demo Asset Gallery with 7 verified Cloudinary demo assets filterable across 5 categories (Nature, Architecture, Portrait, Products, and Urban), paired with live transformation controls:
-
Format:
f_auto,f_webp,f_avif,f_jpg,f_png -
Quality:
q_auto,q_auto:best,q_auto:good,q_auto:eco,q_auto:low, or manualq_10–q_100 -
Maximum Width (
c_limit):320,640,800,1280,1920, or Original
State lives in a page-scoped ImageLabStore that combines Angular Signals (selectedImage, config, status, result, originalUrl, optimizedUrl, responsiveSrcSet) with an RxJS pipeline (Subject, debounceTime, switchMap) to debounce rapid control changes and cancel stale requests cleanly.
Measuring Real Optimization Results
Instead of showing estimated percentages, Cloudinary Image Lab measures the actual image payload downloaded by the browser.
How ImageMetricsService Works in the Repository
In src/app/features/image-lab/services/image-metrics.service.ts:
-
CORS
fetch()withAbortSignalsupport:measureComparison(originalUrl, optimizedUrl, signal?: AbortSignal)andmeasureResource(url, signal?: AbortSignal)executefetch(url, { method: 'GET', mode: 'cors', signal }). Passing anAbortSignalfrom the calling store allows in-flight requests to be canceled whenever the user switches settings rapidly. -
Reading
Blob.sizeandContent-Type: The service reads the response into aBlob(const blob = await response.blob()), recordsblob.sizein bytes, extractsresponse.headers.get('content-type') || blob.type || null, and decodes the image's natural pixel dimensions. -
Important distinction —
Blob.sizevs. HTTP transfer size:blob.sizemeasures the decoded response body size in bytes (the actual image file weight). It does not include HTTP headers, TLS/TCP overhead, or transfer framing, so it can differ slightly from the "Transferred" column in browser DevTools. -
Single
ObjectURLshared with the comparator: If you measure withfetch()and separately render<img [src]="url">, the browser can send differentAcceptheaders forfetch()versus<img>—which underf_autocan result in two different formats being served. By callingURL.createObjectURL(blob)(viasafeCreateObjectUrl) and passing that exactObjectURLintoImageComparatorComponent, both the displayed pixels and the measured bytes come from the exact same HTTP response. -
Cleanup and honest edge cases:
revokeResultObjectUrls(result)explicitly revokesresult.original.objectUrlandresult.optimized.objectUrlwhen results change or the view is destroyed, preventing memory leaks. If a chosen transformation produces a larger file than the original (for example, converting a compressed JPEG photo to PNG), the UI reports the real increase rather than hiding it.
Real Experiment Results
In the workbench experiment shown in the screenshot above, the lab recorded:
| Metric | Result |
|---|---|
| Original file size | 117.4 KB |
| Optimized file size | 36.9 KB |
| Bytes saved | 80.5 KB |
| Reduction | 68.6% |
Keep two caveats in mind when interpreting these numbers:
- Results depend on the image and settings: This reduction reflects one specific asset, transformation configuration, and browser-negotiated format. Other images or presets will yield different numbers.
- Image size reduction ≠ equivalent page load speed gain: Shrinking an image by 68.6% does not translate to a 68.6% faster total page load. End-to-end load time and LCP are also governed by DNS, TLS, server TTFB, render-blocking CSS/JS, network latency, and image decoding.
Comparing Visual Quality
File size metrics only tell half the story—you still need to inspect whether compression introduces noticeable artifacts in fine textures, edges, or gradients.
ImageComparatorComponent provides dedicated visual inspection controls:
- Four comparison modes: Interactive before-and-after slider (supporting pointer, touch, and keyboard navigation), Side-by-side view, Original-only, and Optimized-only.
-
100% to 400% zoom with pan: Inspect fine details across quality presets (
q_auto:bestvs.q_auto:ecovs.q_auto:low) without leaving the browser. - Fullscreen and Reset: Expand the inspection canvas and snap zoom/pan back to default in one click.
- Image download: Download either the original or optimized asset directly from the comparator.
Developer Tools and Responsive Preview
Once you find a transformation setup that fits your visual and performance goals, the workbench generates reusable integration examples automatically.
Code Playground with Shiki
CodePlaygroundComponent stays synchronized with the active transformation signals and generates copyable snippets across four formats—URL, HTML, Angular (using @cloudinary/url-gen and @cloudinary/ng), and TypeScript—syntax-highlighted with Shiki (shiki ^4.6.0).
Responsive Image Preview
In the Responsive Preview tab (ResponsivePreviewComponent), you can switch between Mobile, Tablet, and Desktop viewports to see how srcset and sizes behave across the c_limit,w_* candidates (320, 640, 800, 1280, 1920).
Interactive Bilingual Documentation
To make the project useful as a standalone reference, I built a dedicated Interactive Documentation section (/docs) in both English and Spanish.
It covers 13 structured topics—from Cloudinary fundamentals, Angular 22 integration, f_auto, q_auto, WebP/AVIF, c_limit, and srcset/sizes to interpreting metrics, configuring your own Cloud Name, security considerations, and performance best practices—and includes an interactive delivery pipeline diagram (Source image → Transformation → Cloudinary CDN → User device) with pause and reset controls.
Security and Performance Best Practices
Before taking Cloudinary into production with Angular, keep these rules in place:
Credential Security
-
cloudNameis public by design: It appears in every delivery URL, so configuring it in Angular environment files (environment.ts/environment.prod.ts) is safe and expected. -
Never expose
API_SECRETin Angular: Your Cloudinary API Secret belongs strictly on a trusted backend server—never in frontend source code, environment files bundled into the browser, or public repositories. - Lock down unsigned uploads: If your frontend uploads directly to Cloudinary, restrict the unsigned upload preset (allowed formats, maximum file size, destination folder, and incoming transformations) or generate short-lived signed upload parameters from your backend.
Performance Checklist
- Use
f_auto/q_autoas separate slash-delimited components in delivery URLs unless you intentionally need a fixed format or quality. - Apply
c_limitwith sensible width caps to avoid shipping multi-megapixel originals to small containers. - Pair
srcsetandsizeswith consistent breakpoints so CDN cache hit ratios stay high (avoid passing arbitrary pixel widths likewindow.innerWidthdirectly intow_). - Always set explicit
widthandheightattributes (or CSSaspect-ratio) to prevent CLS. - Use
loading="lazy"for below-the-fold images, and keep above-the-fold LCP hero images eager withfetchpriority="high".
Lessons Learned
Building Cloudinary Image Lab reinforced four practical takeaways:
-
Angular Signals and RxJS complement each other well: Signals simplified synchronous UI state and derived transformation URLs, while RxJS (
Subject,debounceTime,switchMap) remained the cleanest tool for debouncing rapid user input and canceling in-flight fetches. -
Browser header consistency matters when measuring
f_auto: Fetching an image once into aBlob, recordingblob.size, and passing a singleObjectURLto the comparator guarantees that the displayed image and the measured bytes match—even whenf_autonegotiates format dynamically. -
Visual comparison builds real intuition: Numbers alone rarely convince engineers to change compression settings; zooming to 400% on a before-and-after slider makes the trade-offs between
q_auto:best,q_auto:good,q_auto:eco, andq_auto:lowconcrete immediately. -
Testing i18n key parity early saves time: Keeping an automated Vitest check (
language.service.spec.ts) acrossen.jsonandes.jsoncaught missing translation keys as soon as new documentation sections were added.
Live Demo and Source Code
Cloudinary Image Lab is open-source under the MIT License:
- Live Demo: https://cloudinary-image-lab.vercel.app/
- GitHub Repository: https://github.com/Ezequie1Sc/cloudinary-image-lab
- Interactive Documentation: https://cloudinary-image-lab.vercel.app/docs
Run it locally with pnpm:
git clone https://github.com/Ezequie1Sc/cloudinary-image-lab.git
cd cloudinary-image-lab
pnpm install
pnpm start
Run the unit tests with Vitest:
pnpm test
Final Thoughts
Shipping lightweight images in Angular doesn't require maintaining brittle build-time image pipelines. Combining Cloudinary's URL-based transformations (c_limit, f_auto, q_auto) with Angular 22's standalone components and Signals gives you a clean, predictable way to deliver fast, responsive visuals.
Try out Cloudinary Image Lab, explore the GitHub repository, and test your own transformation combinations. If you find it useful—or have ideas, feedback, or your own Angular + Cloudinary optimization lessons—I'd love to hear from you in the comments or via an issue or pull request on GitHub!
Editorial disclosure: I used AI assistance to draft and edit this article. The project and its implementation are my own work.
References
- Cloudinary Angular SDK Documentation
- Cloudinary Image Optimization Guide
- Cloudinary Transformation Rules
- Cloudinary Responsive Images Documentation
- Angular Signals Official Guide
- Angular Image Optimization (
NgOptimizedImage) - Angular
provideCloudinaryLoaderAPI Reference - MDN Web Docs: Responsive Images (
srcsetandsizes) - web.dev: Core Web Vitals Overview
- web.dev: Largest Contentful Paint (LCP)
- web.dev: Cumulative Layout Shift (CLS)













Top comments (0)