Skip to content

Commit d5d3fc8

Browse files
committed
Add jxl and pdf to formats
1 parent 0ab711a commit d5d3fc8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/options/format.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { guardIsUndef, guardIsValidVal } from "../utils";
44
const formatValues = {
55
png: true,
66
jpg: true,
7+
jxl: true,
78
webp: true,
89
avif: true,
910
gif: true,
@@ -12,6 +13,7 @@ const formatValues = {
1213
bmp: true,
1314
tiff: true,
1415
mp4: true,
16+
pdf: true,
1517
best: true,
1618
};
1719

src/types/format.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* At the moment, imgproxy supports only the most popular image formats.
66
* - `png` — Portable Network Graphics
77
* - `jpg` — Joint Photographic Experts Group
8+
* - `jxl` — JPEG XL
89
* - `webp` — WebP
910
* - `avif` — AV1 Image File Format
1011
* - `gif` — Graphics Interchange Format
@@ -13,6 +14,7 @@
1314
* - `bmp` — Bitmap
1415
* - `tiff` — Tagged Image File Format
1516
* - `mp4` — **PRO feature** MPEG-4
17+
* - `pdf` — **PRO feature** PDF document
1618
* - `best` — **PRO feature** to make imgproxy pick the best format for the
1719
* resultant image. Check out the {@link https://docs.imgproxy.net/best_format | Best format guide}
1820
* to learn more.
@@ -25,6 +27,7 @@
2527
type Format =
2628
| "png"
2729
| "jpg"
30+
| "jxl"
2831
| "webp"
2932
| "avif"
3033
| "gif"
@@ -33,6 +36,7 @@ type Format =
3336
| "bmp"
3437
| "tiff"
3538
| "mp4"
39+
| "pdf"
3640
| "best";
3741

3842
/**

0 commit comments

Comments
 (0)