Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

72
Visualizações
React use-screen-shot unable to take a screenshot of an Image

I am using use-screen-shot to take screenshot in React. Everything is working fine but the only thing missing is the image. Now if image's source is local, I can take screenshot of it. But if it's url, it shows a white space.

I can't seem to make it work. Any idea ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

To load image data into JavaScript (which is required by useScreenShot) you need to have permission to do so.

For local images, that is automatic. For crossorigin images you need to:

  • Add the crossorigin attribute to request permission via CORS (e.g. <img src="http://placekitten.com/100/100" alt="" crossOrigin="anonymous" />)
  • Have the server use CORS response headers to grant you permission to read it

You can't load image data across origins without permission from the source of the image. The usual alternatives to CORS (as per the answer in the previous link), such as using a proxy, apply.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda