x

How do you prevent people from middle clicking images (opening them in a new tab)

Hi, I am current making a Photography website and recently I found a way to prevent people from being able to right click on images (so that people cannot directly/easily download my photographs, however, since I have my photographs in a gallery (which requires people to click images so that the slideshow comes up) you can easily just middle click the images and it opens up the full picture on it's own new tab. Is there a way to prevent the ability to open up images in their own tab?

for example, if you use your scroller (middle click) and click an image in the gallery, it brings you to a new page with a link that looks like this:

www.mysite.weebly.com/uploads/1/7/5/2/12528351/20190808-115403-hdr_orig.jpg

1,798 Views
Message 1 of 5
Report
4 REPLIES 4
Square

Hi there. Disabling right click (or any click) is not going to prevent someone from viewing the source code. The action you are describing (opening the image in a new tab) can also be accomplished by holding the shift or control button and left-clicking with the mouse. 

That said, I don't know the specific code you would need for the middle click, but you may be able to find another thread on here that has the code you are looking for. Smiley Happy

1,790 Views
Message 2 of 5
Report

@Bernadette @Skunk 

Hi ..this disables KEYBOARD SHORT CUTS   like CNTRL P   etc etcimage

Paste it in the sites  SEO 'HEADER CODE' BOX

Also detailed on here together with right click disable

https://www.nomadicbackpacker.com/blogging-with-weebly/how-to-block-someone-from-downloading-your-im...

Smiley Happy))

1,760 Views
Message 2 of 5
Report

Hi, thanks for the replies. Unfortunately this isn't quite what I am looking for. The gallery element is a great way to display images, however, due to the option to click on images (so that the interactive slideshow pops up) anyone can (instead of left clicking to open the slideshow) middle click the images which is my issue. I need a way to make it so that you can still open up the slideshow but you cannot middle click and open a full image page.

1,755 Views
Message 2 of 5
Report

another possibly solution would to be disabling access to the sitename.weebly.com/uploads pages. do you know if this is possible at all?

1,731 Views
Message 2 of 5
Report