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

113
Views
Loading files on client-side react application

Good afternoon, I am trying to create a React (static) application, made of only on client-side. I do not need server. On client-side there are several images.. I would like to find a way in which the admin of the application is able to load images and to put them into public/img folder of react application. Is it possible to do something like that?

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

0

Create an assets folder inside src. That will be the folder where you store the images. See React: Adding Images, Fonts, and Files

/* Component.js */
import React from 'react';
import image from 'PathToAssetsFolder/img.png'; // Tell webpack this JS file uses this image

console.log(image); // PathToAssetsFolder/img.84287d09.png

function Header() {
  // Import result is the URL of your image
  return <img src={image} alt="Image" />;
}

export default Header;
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!