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

348
Views
How can I get an image, script, or other asset from a site that's displaying it for a src to be able to use in HTML?

I'm currently working with a proxy, and have run into the issue that images are not proxied, so my solution is to rewrite the various URLs and src attributes to be passed through my proxy. However, I've run into an issue where after running them through my proxy, the image is displayed, instead of processed in a way where the image can be then ripped by an <img> or <script> tag src.

function edit(){  
        var proxy_url = "----insert proxy query here----";
        var srcNodeList = document.querySelectorAll('[src],[href]');

        console.log(srcNodeList)
        for (var i = 0; i < srcNodeList.length; ++i) {
            console.log("Prior: " + srcNodeList[i].src + " | " + srcNodeList[i].href)
            if(srcNodeList[i].src){
                srcNodeList[i].src = proxy_url + srcNodeList[i].src;
            }
            if(srcNodeList[i].href){
                srcNodeList[i].href = proxy_url + srcNodeList[i].href;
            }
            console.log("   Modded: " + srcNodeList[i].src + " | " + srcNodeList[i].href+"\n")
        }                         
    }
    edit()

The issue lies where after passing the image through the proxy, such as https://proxynamehere.com?url=imagedirectorylink.com/img.img that it's only displayed, so using it then as a src provides no image.

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!