Skip to content

Commit 5f7ccbe

Browse files
committed
Merge branch 'main' into beta
2 parents d262d80 + 0ecd331 commit 5f7ccbe

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@
114114
"contributions": [
115115
"code"
116116
]
117+
},
118+
{
119+
"login": "Mrinank-Bhowmick",
120+
"name": "Mrinank Bhowmick",
121+
"avatar_url": "https://avatars.githubusercontent.com/u/77621953?v=4",
122+
"profile": "https://www.mrinank.me",
123+
"contributions": [
124+
"code"
125+
]
117126
}
118127
],
119128
"contributorsPerLine": 7,

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<picture>
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors-)
3+
[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/62209650/196528621-b68e9e10-7e55-4c7d-9177-904cadbb4296.png" align="center" height=50>
66
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/62209650/196528761-a815025a-271a-4d8e-ac7e-cea833728bf9.png" align="center" height=50>
@@ -86,6 +86,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
8686
<td align="center" valign="top" width="14.28%"><a href="http://soumyadipmoni.vercel.app"><img src="https://avatars.githubusercontent.com/u/116944847?v=4?s=100" width="100px;" alt="Soumyadip Moni"/><br /><sub><b>Soumyadip Moni</b></sub></a><br /><a href="https://github.com/cloudinary-community/cloudinary-util/commits?author=AvaterClasher" title="Code">💻</a></td>
8787
<td align="center" valign="top" width="14.28%"><a href="https://noorasfatima.netlify.app/"><img src="https://avatars.githubusercontent.com/u/30138146?v=4?s=100" width="100px;" alt="NOORAS FATIMA ANSARI"/><br /><sub><b>NOORAS FATIMA ANSARI</b></sub></a><br /><a href="https://github.com/cloudinary-community/cloudinary-util/commits?author=nooras" title="Code">💻</a></td>
8888
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayan-joshi"><img src="https://avatars.githubusercontent.com/u/96243602?v=4?s=100" width="100px;" alt="Ayan Joshi"/><br /><sub><b>Ayan Joshi</b></sub></a><br /><a href="https://github.com/cloudinary-community/cloudinary-util/commits?author=ayan-joshi" title="Code">💻</a></td>
89+
<td align="center" valign="top" width="14.28%"><a href="https://www.mrinank.me"><img src="https://avatars.githubusercontent.com/u/77621953?v=4?s=100" width="100px;" alt="Mrinank Bhowmick"/><br /><sub><b>Mrinank Bhowmick</b></sub></a><br /><a href="https://github.com/cloudinary-community/cloudinary-util/commits?author=Mrinank-Bhowmick" title="Code">💻</a></td>
8990
</tr>
9091
</tbody>
9192
</table>

packages/url-loader/src/constants/parameters.ts

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,36 @@ export type FlagRecord = Partial<Record<Flag, StringifiablePrimative>>;
107107
* @url https://cloudinary.com/documentation/transformation_reference#f_format
108108
* @qualifier f
109109
*/
110-
export type Format = string;
110+
export type Format =
111+
| "auto"
112+
| "auto:image"
113+
| "auto:animated"
114+
| "gif"
115+
| "png"
116+
| "jpg"
117+
| "bmp"
118+
| "ico"
119+
| "pdf"
120+
| "tiff"
121+
| "eps"
122+
| "jpc"
123+
| "jp2"
124+
| "psd"
125+
| "webp"
126+
| "zip"
127+
| "svg"
128+
| "webm"
129+
| "wdp"
130+
| "hpx"
131+
| "djvu"
132+
| "ai"
133+
| "flif"
134+
| "bpg"
135+
| "miff"
136+
| "tga"
137+
| "heic"
138+
| "default" // library specific feature to turn off automatic optimization
139+
| (string & {});
111140

112141
/**
113142
* @description Determines which part of an asset to focus on. Note: Default of auto is applied for supported crop modes only.

packages/url-loader/src/types/asset.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import type { UnderlaysPlugin } from "../plugins/underlays.js";
1313
import type { VersionPlugin } from "../plugins/version.js";
1414
import type { ZoompanPlugin } from "../plugins/zoompan.js";
1515

16+
import type { Format } from '../constants/parameters.js';
17+
1618
export type SupportedAssetTypeInput = SupportedAssetType | "videos" | "images";
1719

1820
export interface BaseAssetOptions<
@@ -41,7 +43,7 @@ export interface BaseAssetOptions<
4143
* @description Converts (if necessary) and delivers an asset in the specified format.
4244
* @url https://cloudinary.com/documentation/transformation_reference#f_format
4345
*/
44-
format?: string;
46+
format?: Format;
4547
/**
4648
* @description Height of the given asset.
4749
*/

0 commit comments

Comments
 (0)