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

106
Views
Is there a function that makes an image not clickable so that the default chrome widget doesn't appear and allow them to download the image?

Is there a function that makes an image not clickable so that the default chrome widget doesn't appear and allow them to download the image??

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You could just add it onto a canvas which makes the image unclickable:

HTML

<canvas id="myCanvas">
<img id="image"src='https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png'>

Javascript

window.onload = function() {
  var c = document.getElementById("myCanvas");
  var ctx = c.getContext("2d");
  var img = document.getElementById("image");
  ctx.drawImage(img, 10, 10);
};
about 4 years ago · Juan Pablo Isaza Report

0

CSS

body {
-webkit-user-select: none;  /* Chrome all / Safari all */
-moz-user-select: none;     /* Firefox all */
-ms-user-select: none;      /* IE 10+ */
-o-user-select: none;
user-select: none;
}

JS

<script>
document.addEventListener('contextmenu', event => event.preventDefault());
</script>

HTML

<body oncontextmenu="return false;">

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!