How do I open tab effects when an image is click

I’v working on a solution where I have split the work flow of uploadcare to 2 section where, first user will use the file uploader to upload images and then the images are loaded to the webpage. Then from the webpage when user click on an image it should load the upload care tab effects. At the moment it loads the widget but no effects.

HTML Element
<input type="hidden" id="crop-box" name="crop-box" data-single data-tabs="" data-images-only data-effects="crop,rotate,enhance,sharp,grayscale" />

Here is the JS code

        var singleWidget = uploadcare.SingleWidget('[id=crop-box]');
        uploadcare.registerTab('preview', uploadcareTabEffects);
        singleWidget.value($(this).find('img').attr('src'));
        singleWidget.openDialog();

Any ideas how can I load tab effects on this singleWidget widget instance?

Hi @dev1 :wave:

Have you installed the EffectsTab library? If so, are you getting any errors/warnings in the console? Can you share your code with Codepen or Codesandbox so we can check it live?

Hi Alex,
Thanks for getting back to me, It was a simple CSS issue I had, and manage to fix it. Now I have another quick question. We want to display a image overlay and manage to do it with your awesome overlay api.
E.g: https://ucarecdn.com/94354447-e368-4fb6-8962-5d99fb4b039a/-/scale_crop/420x420/center/-/preview/420x420/-/overlay/c4c01083-9e59-4306-8970-cb93fde728e9/420x420/

Unfortunately when I try to add any effects to it it fails:

E.g : when I apply a rotate it fails :
https://ucarecdn.com/43635b35-55fe-40cb-a1f5-74b2c51d1aaf/-/preview/-/rotate/270/-/scale_crop/420x420/center/420x420/-/overlay/c4c01083-9e59-4306-8970-cb93fde728e9/420x420/-/preview/1162x693/-/setfill/ffffff/-/format/jpeg/-/progressive/yes/

would you be able to tell me whats wrong with the above URL and how should I build it for it to work with any effect applied and also have the overlay applied?

Really appreciate your help.
Thanks!
Reagrds
Thanura

There’s the extra “420x420” parameter in the “scale_crop” operation. Just remove it to make the URL work

https://ucarecdn.com/43635b35-55fe-40cb-a1f5-74b2c51d1aaf/-/preview/-/rotate/270/-/scale_crop/420x420/center/-/overlay/c4c01083-9e59-4306-8970-cb93fde728e9/420x420/-/preview/1162x693/-/setfill/ffffff/-/format/jpeg/-/progressive/yes/