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

457
Views
How to convert local image path to url

I am fairly new to React, and is trying to convert an local image file path to a data url or blob url that can be used in the src.

import image from "./img1.jpeg" will not work for my case because the image file will only be created after some user interaction that will trigger the backend processing script.

I have an idea of creating a hidden upload field and upload the image then convert it to URL with URL.createObjectURL(e.target.files[0]) but I have no knowledge in doing that...

Since @quentin stated that I should convert the file path to URL in server-side code(expressjs), how can I do the conversion?

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!