remove photo background API upload widget
I want to use the SDK client side upload widget in order to upload a photo and automatically removes the background
can i use the background_removal:'cloudinary_ai' like the following ?
var myWidget = cloudinary.createUploadWidget({
cloudName: 'cloud name',
uploadPreset: 'my preset', cropping: true,background_removal:'cloudinary_ai'}, (error, result) => {
if (!error && result && result.event === "success") {
console.log('Done! Here is the image info: ', result.info);
myWidget.close();
}
}
)
document.getElementById("upload_widget").addEventListener("click", function(){
myWidget.open();
}, false);
-
Hi Akram,
You can add the background removal to your upload preset setting. under the image analysis and ai.
Here is a screenshot: https://www.screencast.com/t/aPe6YT278F3V
Then you just upload using the upload preset. You can also use sign upload preset and use it as a default one for all your uploads.
Hope that helps :)
0
Post is closed for comments.
Comments
1 comment