imagekit-developer / imagekit-react

React SDK for using ImageKit.io
https://imagekit.io
MIT License
102 stars 28 forks source link

How To Add 'alt' text ? #111

Closed mandorakannu closed 1 year ago

mandorakannu commented 1 year ago

I am still confused how to add alt text . I search in docs but doesn't get anything here.

ahnv commented 1 year ago

Hey!

Any attribute for the img tag passed to IKImage will be rendered in the dom accordingly

<IKContext urlEndpoint="https://ik.imagekit.io/demo">
    <IKImage path="/default-image.jpg" alt="Default Image" />
</IKContext>

You can find a working demo here