astro-cloudinary
Version:
<a href="https://github.com/cloudinary-community/astro-cloudinary/actions/workflows/test_and_release.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/cloudinary-community/astro-cloudinary/test_and_release.y
21 lines (16 loc) • 716 B
text/typescript
import { constructCloudinaryUrl } from '@cloudinary-util/url-loader';
import type { ImageOptions, ConfigOptions, AnalyticsOptions } from '@cloudinary-util/url-loader';
import { getCloudinaryConfig, getCloudinaryAnalytics } from "../lib/cloudinary.js";
/**
* getCldImageUrl
*/
export type GetCldImageUrlOptions = ImageOptions;
export type GetCldImageUrlConfig = ConfigOptions;
export type GetCldImageUrlAnalytics = AnalyticsOptions;
export function getCldImageUrl(options: GetCldImageUrlOptions, config?: GetCldImageUrlConfig, analytics?: GetCldImageUrlAnalytics) {
return constructCloudinaryUrl({
options,
config: getCloudinaryConfig(config),
analytics: getCloudinaryAnalytics(analytics)
});
}