react-responsive-carousel icon indicating copy to clipboard operation
react-responsive-carousel copied to clipboard

Specify thumbnail image

Open richardansell opened this issue 7 years ago • 1 comments

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.

richardansell avatar Mar 25 '19 09:03 richardansell

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>

richardansell avatar Mar 28 '19 12:03 richardansell