Closed Alfrex92 closed 5 years ago
hey @Alfrex92,
Thanks for report the issue ❤️
it depend on your app weather is server-side render or not? if it's client-side rendering then probably you would only see <noscript />
content under browser source (for entire app). if you have SSR support then it should render out the <img />
with alt
tag.
let me know if this makes sense?
cheers bill
I'm using SSR so I'd love if you can add the noscript tag below the img.
Also, I found a performance issue on the CSS
Instead of using
transition: all 0.3s ease 0s;
You need to apply the transition to the property that you are being animated, in this case is opacity. So the code should be
transition: opacity 0.3s ease 0s;
Hope that you can fix and add the noscript tag. My company would like to use your library. Also, are you planning to add support to figure and caption?
Thanks 😃
Thanks for reporting transition
bit.
I have included noscript
for each image, in the following version please test it out
2.2.0-beta.1
I don't see the commit, where can I download the latest version?
Thanks
you can just do this
yarn add react-simple-img@2.2.0-beta.1
npm i react-simple-img@2.2.0-beta.1
I will need some testing tmr, once everything works well on yours and my end, I will publish the version.
thanks bill
i can't install the new version, but it shouldn't be any error with the library. Hope you can publish it soon 😄
react-simple-img@2.2.0 published
it is working, thank you 😄
(I tested with NextJS)
nice thanks, please leave star to the repo if you find it useful to support this package (if you already, thanks again) 🙏
This package is extremely easy to use and it works perfectly. But, there is one big problem it is not compatible with SEO. What is necessary to give support to SEO is a
<noscript>
tag below the img.Describe the solution you'd like
Add the no script tag below the img As an example:
Additional context Note: the ALT attribute should be also in the noscript tag
You can find more info here: Deliver search-friendly JavaScript-powered websites Lazy Loading Images and Video