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

147
Views
React: Image is not displayed

Im folgenden Code sieht man wie ich das bild darstellen möchte, das Bild wird aber nicht angzeigt, nur der text wird angezeigt.

<div> <b> Test123 </b> <image src={require('../../assets/images/homepage/homepage-splash-1.jpeg')} alt='loading...'></image> </div>

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

0

as far as I know, one way to use local image address is to import it. something like this:

import homePageSplash from "../../assets/images/homepage/homepage-splash-1.jpeg"

return (<img src={homePageSplash} alt="" />)
about 4 years ago · Juan Pablo Isaza Report

0

You don't need to use require here. Only specify the path to the image

<image src='../../assets/images/homepage/homepage-splash-1.jpeg' alt='loading...'></image>
about 4 years ago · Juan Pablo Isaza Report

0

You need to import your image first outside the class of react view file. Like on the top like this:

import imageName from 'images/yourImageName.png';

Now inside the class of react file you can call this image like this:

<img src={imageName}  alt="Image Title"/>
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!