Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

282
Views
How to convert our local images to Base64 in Next js using Plaiceholder

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!