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

191
Views
Invalid src prop in Nextjs Image tag
<Image
  src={"http://localhost:3000/images/img.jpeg"}
  layout="fill"
  objectFit="cover"
  width={"100%"}
  height={"100%"}
/>

The error is :

enter image description here

How do I solve ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The error says that, the url that you are using for the Image is not from a trusted hostname(domain). You just need to add that hostname or domain inside your next.config.js file. Follow the following steps :

  1. Create a next.config.js file inside your root directory.
  2. Add the following code inside your next.config.js file.
module.exports = {
  images: {
    domains: ['assets.example.com'],
  },
}

This must solve your problem. For more details you can read more on this page : next.config.js

about 4 years ago · Juan Pablo Isaza Report
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!