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

995
Views
¿Cómo mostrar la imagen base64 en React Js?

Recibo la imagen como Base64 del servidor. Quiero decodificar y mostrar la imagen. ¿Cómo decodifico base64 a Image? No quiero pegar directamente la cadena base64 en la fuente de la imagen, ya que lleva mucho tiempo cargar la imagen y tampoco es compatible con algunos navegadores.

A continuación se muestra el código:

 // Takes base64 string & returns Image function decodeBase64Image(base64_string) { }; var Image = decodeBase64Image(base64_string); <img src={Image} />
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Es posible que deba asegurarse de que se proporcione el prefijo, pero la decodificación no debería ser necesaria.

 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4 //8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
about 4 years ago · Santiago Trujillo 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!