react-responsive-carousel
react-responsive-carousel copied to clipboard
Specify thumbnail image
How is it possible to specify thumbnail images rather than allowing the default to scale down an image? I'm trying to use WebP format and can only achieve this for the slide images.
Managed to solve this in the end using the following code:
<Thumbs selectedItem={carouselIndex} onSelectItem={index => this.setState({carouselIndex: index})}>
{carouselThumbs.map(thumbnail => {
return (
<img alt={thumbnail.alt} height="100%" key={thumbnail.key}
src={webPSupport ? thumbnail.imageWp : thumbnail.image} width="100%"/>
)
})}
</Thumbs>