Using Next Image with Thumbnail plugin #173
-
Is your feature request related to a problem? Please describe.I am using Next Image for the album view as well as the slider but the thumbnails are loading the full sized images. Could you provide an example of using the Thumbnail plugin with the Next Image component please? Describe the solution you'd likeThe thumbnails in the slider should use Next Image to load a smaller version of the original images. Describe alternatives you've consideredNo response Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You can re-use the same <Lightbox
open={open}
close={() => setOpen(false)}
slides={slides}
plugins={[Thumbnails]}
render={{ slide: NextJsImage, thumbnail: NextJsImage }}
/> |
Beta Was this translation helpful? Give feedback.
-
Thanks, that worked perfectly! I think it would be worth adding this to the docs in the Next section. |
Beta Was this translation helpful? Give feedback.
You can re-use the same
NextJsImage
component for the thumbnail, just need to specify it as arender.thumbnail
render function.