js-url-gen icon indicating copy to clipboard operation
js-url-gen copied to clipboard

Feature Request: Allow more control over placeholder

Open fcisio opened this issue 4 years ago • 4 comments

Hi, I love this new version of the SDK so far! But I do which that we would have more contrôl over the image placeholders.

Examples:

  • Control some props for each mode: placeholder('pixelate', [10]), placeholder('blur', [600]), ...
  • Control the transition from placeholder to definitive image: fade, speed, delay, ... (currently the image simply blinks)

fcisio avatar Aug 24 '21 16:08 fcisio

Hi there, We support the feature of blur, pixelate for image placeholders. Please check out:

documentation: https://cloudinary.com/documentation/react_image_manipulation#image_placeholders tutorial: https://cloudinary.com/documentation/advanced_image_components_tutorial

Please let me know if you have further questions. Thanks, Mo

momoip avatar Aug 24 '21 21:08 momoip

Hey, @momoip I'm aware that those are already features, this request is about extending them

Currently, those plugins only accept a string each (SDK v2), my suggestion would be to add a second argument Array which could be passed to the placeholder actions.

This array would make it possible to control the level of pixelation, blur, vectorization, ...


This could also open the door to custom placeholders by exposing the image var

placeholder('custom', [(image) => image.effect(cartoonify())])

fcisio avatar Aug 24 '21 21:08 fcisio

Hi fcisio, Thanks for the clarifications. I will consult our team to see if it's on our roadmap. If not, I can create a feature request for this. Cheers,

momoip avatar Aug 24 '21 22:08 momoip

Hi fcisio, I've created a feature request based on your inputs. Thanks.

momoip avatar Aug 24 '21 23:08 momoip