-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add alt
to <Image> component
#74
Comments
You may use the |
gokcan
changed the title
alt Tag is missing from image props
How to add Jul 27, 2021
alt
to <Image> component
can you give example how to use NativeImgProps |
@arifals27 I haven't used this in 2 years now, but I guess you may just do something like here is the line that adds that NativeImgProps to the Image props |
Example usage: import React from 'react'
import { Image, Breathing } from 'react-shimmer'
function App() {
return (
<div>
<Image
src='https://source.unsplash.com/random/800x600'
fallback={<Breathing width={800} height={600} />}
NativeImgProps={{ alt: "Descriptive text." }}
/>
</div>
)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for SEO optimization the image's
alt
tag is needed.It would be optimal to have it on the Image component.
The text was updated successfully, but these errors were encountered: