Aljullu / react-lazy-load-image-component

React Component to lazy load images and components using a HOC to track window scroll position.
https://www.npmjs.com/package/react-lazy-load-image-component
MIT License
1.46k stars 110 forks source link

Use the `next/image` #118

Open fariborz0015 opened 1 year ago

fariborz0015 commented 1 year ago

hello my friend ,

thank you for your great package

my main stack is NextJs developing and i need in improve performance case in my project to use the next js local image tag from "next/image"

is exist any way to pass the this component as a node to lazyLoad component to use this node for load image replace html image tag ?

moyongshi commented 1 year ago

Next.js has handled very good! you don't need this package

monolithed commented 1 year ago

@moyongshi, both projects are dead. Have you tried to set srcSet in Next.js? It's not possible

jotacodestudio commented 1 year ago

@fariborz0015 thanks for your question. We are not very familiar with Next.Js, but have you tried wrapping the next/image component with LazyLoadComponent? You could use the LazyLoadImage implementation as a reference, but changing <img> with the Next.Js image component.