-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
I found some problem with avif files, It didn't work with AutoplaySlider
so as you can see, it only loads more than 70% then stop
I'm currently using nextjs 11.1.2, and this is my code.
import { FC } from 'react'
import style from './ImageSlider.module.css'
import AwesomeSlider from 'react-awesome-slider'
import withAutoplay from 'react-awesome-slider/dist/autoplay'
interface Props {
className?: string
}
const AutoplaySlider = withAutoplay(AwesomeSlider)
const images = ['/banner/01.avif', '/banner/02.avif']
const ImageSlider: FC<Props> = ({ className }) => {
return (
<div className={className}>
<AutoplaySlider
// animation="foldOutAnimation"
play={true}
cancelOnInteraction={false}
interval={5000}
cssModule={style}
>
{images.map((image) => (
<div key={image} data-src={image} />
))}
</AutoplaySlider>
</div>
)
}
export default ImageSlider
Metadata
Metadata
Assignees
Labels
No labels