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

169
Views
I Want To Display The ImagesUrl's In The Array according To The Number of images the Array has, using Reactjs

I am using React Carousel from The dependency react-responsive-carousel to display the image the user has uploaded on firebase I query the images in an Array Like:

image: [imageUrl/0, imageUrl/1, imageUrl/2, imageUrl/3, imageUrl/4] // Maximum is 5
    //then display it like 
<Carousel 
         infiniteLoop
         showStatus={true}
         showIndicators={true}
         showThumbs={true}
     >
         <div>
         <img src={imagesUrl[0]} alt="title"/>  
         </div>   
         <div>
         <img src={imagesUrl[1]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[2]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[3]} alt="title"/> 
         </div>
         <div>
         <img src={imagesUrl[4]} alt="title" />
         </div>
     </Carousel>

It Works fine But when the user uploaded 3 images it will show 5 images the last 2 will be blank white images, is it possible to Map the Array in a way I only show what is in the array?

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

0

you can loop over the images and show them:

using map:

...
images.map((image) => {
    return <div>
        <img src={image} alt="title" />
    </div>
})
...
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!