Eager Function is Not Working with API call from NextJs
Bug report for Cloudinary NPM SDK
Before proceeding, please update to latest version and test if the issue persists
cloudinary.uploader.upload('https://res.cloudinary.com/demo/image/upload/couple.jpg', { eager: [ { width: 1000, height: 1000, crop: "pad" }, { width: 260, height: 200, crop: "crop", gravity: "north"} ] }, function (err, image) { if (err) { console.log(err); } console.log(" " + image.url); });*
Describe the bug in a sentence or two.
…Image is uploading but no transformation is being applied (Need solution )
Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK [ ] Babel - Babel errors or cross browser issues [ ] Performance - Performance issues [ ] Behaviour - Functions aren’t working as expected (Such as generate URL) [ ] Documentation - Inconsistency between the docs and behaviour [ ] Incorrect Types - For typescript users who are having problems with our d.ts files [ ] Other (Specify)
Steps to reproduce
… if applicable
Error screenshots
… if applicable
Browsers (if issue relates to UI, else ignore)
[ ] Chrome [ ] Firefox [ ] Safari [ ] Other (Specify) [ ] All
Versions and Libraries (fill in the version numbers)
Cloudinary_NPM SDK version Node - 14.17.6 NPM - 8.5.5
Config Files (Please paste the following files if possible)
Package.json
Repository
If possible, please provide a link to a reproducible repository that showcases the problem
Hey @TarunBhan - it looks like you're looking for Incoming transformations, and not eager.
-
Eagerwill generate the various derived assets immediately, but it will store the original as is -
Incomingwill store the uploaded file already transformed.
You can read more about it here:
https://cloudinary.com/documentation/transformations_on_upload#incoming_transformations
Hi @TarunBhan, did the documentation help or does the issue still persist?