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

187
Views
Download image from URL in HTML/JavaScript

I want to download image from website and that image is located to a different website. I specified image's url but it's not downloading. It just opens the picture itself in its original page but only image is displayed. I can't identify the problem. Here's my code:

document.querySelector("#memeDownload").addEventListener("click", function () {
    var a = $("<a>").attr("href", "https://iynmemes.netlify.app/images_memes/meme0.jpg").attr("download", "Meme(IYN").appendTo("body");
    a[0].click();
    a.remove();
});
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!