-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hello!
Firstly, i want to say, that your project is very weell.
I have some problems with img component and next-optimized-images. I want to create specific component, whic return img component from 'react-optimized-image'.
`
import Img from 'react-optimized-image';
const Image = ({src, ...rest}) => {
сonst sizes = [100, 200, 300];
return (
<Img
src={require(`Public/images/${src}`)}
webp
densities={[1, 2]}
breakpoints={[480, 576, 768, 992, 1200, 1600]}
sizes={sizes}
{...rest}
/>
);
};
export default Image;
`
When i run "npm dev", there is syntax error in console - "Only static array with number values is allowed". https://i.imgur.com/ZpTgGqu.png
Can you help me, please?
Metadata
Metadata
Assignees
Labels
No labels