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

74
Views
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 answers
Answer question

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 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!