Skip to content

Commit 7cd7653

Browse files
committed
add image optimization demo.
1 parent 73356b2 commit 7cd7653

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require('dotenv').config()
2+
const cloudinary = require('cloudinary').v2;
3+
4+
cloudinary.config({cloud_name: process.env.CLOUDINARY_CLOUD_NAME})
5+
6+
// Quality Options
7+
// ---------------
8+
// auto
9+
// best
10+
// good
11+
// eco
12+
// low
13+
14+
const img = cloudinary.url("examples/shoes_kto0zb", {
15+
quality: "auto",
16+
fetch_format: "auto",
17+
})
18+
19+
console.log(img)

0 commit comments

Comments
 (0)