0

I have been using plaiceholder for getting base64 converted image to pass in blurDataUrl in next/Image component.

export const getStaticProps = async () => {
    const { base64, img } = await getPlaiceholder(
        "imagePath",
      { size: 10 }
    );
  
    return {
      props: {
        imageProps: {
          ...img,
          blurDataURL: base64,
        },
      },
    };
  };



 const PageBase64Single = ({ title, heading, imageProps }) => (
        <Image {...imageProps} placeholder="blur" />
);

Here I have 2 problems:

  1. I want to keep this imagePath dynamic so that I can pass on multiple images and url accordingly in blurDataUrl
  2. when I am using this it is giving fs not found

Stuck since a long time, kindly help

Muskan Rawal
  • 58
  • 1
  • 9

0 Answers0