Prevent downloading of posted images

Hey Jeff, excellent point. The difference between a downloaded image and a screenshot is going to be related to size and resolution. Our members will be posting larger images at higher resolution with the EXIF data intact. A screenshot will surely grab the image, but only at web screen resolution which is never going to make a decent print. Downloading the member’s image could provide a print ready image and even though I trust our members (it’s in our terms and conditions about using the work of others), some of my early adopter group are asking the question. Cheers!

1 Like

If the user is tech-savvy, there is literally no way to stop them from downloading the image via their browser controls, to be clear. So you’d only be “stopping” people who were casual computer users.


If someone can see the image in their web browser there is nothing that can stop them from saving the image locally.

Photographers need to know that. If they want to protect their images, they should do it with watermarks. If you really want to protect them you could have a plugin developed that would watermark all images with the forum name and maybe the username too.


Unless the photographers transfer the rights to the forum they need to take responsibility to watermark their images prior to uploading. Otherwise when said watermarking is defeated it’s easy to shift blame onto the site owners.

1 Like

This was discussed a bit here before, the code in this post will block right click on images so you can’t save them.

This, and other methods, can be circumvented with a little effort.

A watermarking plugin would certainly be interesting! Should be fairly easy to do with imagemagick?


And why would you let them do that if no one is supposed to see that data? Either put in place a file-size limit that forces the user to web-optimize before uploading, or have a background task run through uploads, and process them to web specs. Keep only the webified files.

If you don’t want anyone to save the full-size file, you don’t want the overhead of having it loaded for everyone who views the forum thread either.

1 Like

Thank you all for the input. Discourse is working as needed for our club. If there is no native method to prevent users from downloading images that other users post I will update our terms of use policy.

This topic can now be closed.

OK – you can use the customization that Kris linked, above, if you want to prevent the right click kind of downloading from casual users.

Hello, can you add watermark feauter for thumnail or all of photos on a topic?
Thank you!

We have the same concerns.

I know you allways can get a copy of what you see in the display, but it would be great to make it a bit more difficult.

Users have reported concerns about it, being it so easy to download an image.

It would be great to limit just the author to download the image.

500px does it ok, you cannot even use the rigt click to use the “save image as” command.

Of course you can allways use the copy screen option.

We are a photography forum.
Using watermarks is not desirable, as you cannot judge a photo that shows an evident watermark: they interfere the viewing.

Great, Kris, thank you. That solves part of the problem. Now I need to prevent users from downloading images using the download link in the lightbox.

I wish that instead of just ignoring the right mouse button click event it sould show a smal text displaying “This image is private and belongs to xxxx, you cannot download it” similar to

May you provide cues on how to do that?

Thank you.

EDIT: I have found a way to do it, I don’t know if it is the best way or it can have side effects.

In the theme personalization, I have edited CSS and inserted this:

display: none;

image-souse-link seems to be the class associated to the download link and icon displayed to download image.

It is not the best solution, as the author should have the ability to download the image, but it makes the job.

Of course, but many many users are not tech savy.
And if you cannot download the original file you can get just a screen resolution copy.

I will try kris suggestion.
But they always can use the download link that provides the lightbox component.
Is there a way to disable it?

It would be great to have a global parameter to disable image download in the lightbox except for the author.

Watermarks are great for selling photos.

But you cannot judge a photo that has a watermark.
We disolay photos in our forum in order to get opinions and ideas to imorive them. If they have a watermark it interferes with image visualization.

There is no way to stop a techy user to get a copy from screen But ut is better to put as much difgicults as possible.

I don’t think the above statement is remotely true. Watermarks are how most agencies and photo studios present previews of shots to customers when they’re selling reproduction rights or ordering prints.

If the watermarks prevented customers from deciding what they wanted, or reduced sales, they would be using a different approach such as RMS.


Of course, I have said that: watermarks are the best way to sell images.

But we are not selling images, we are a forum of photography, and we show our images in order to get opinions about them and receive critics.

You won’t see any art gallery were day will display your arte with a watermark over it.

you will not find any jury of a contest that admits images with a watermark.

Any way if you upload an image to a photogrophy forum with a watermark to get opinions all you would receive is “Watermark spoils image” or “I cannot judge image quality with that watermark” or “watermark is too distracted”.
You receive that with just signatures on the image if they are too evident.

So watermarks are not an option for us.
May be an excellent way of protect your image (not so good if they are not stron enough, you can easily remove a tranparente watermark, or delete if if it is in a corner).

I have used the code linked by @awesomerobot, and the CSS customization that I have posted above to don’t let the user download an image easely.

But I have a problem:

The code disables right clicking in any part of the page, not just images.

I want the code to disabled the contextmenu when someone right clicks on an image, but not when he right clicks in a link, for example.

A user might want to get the contextual menu in a link for displaying the destination in a new window, for example.

How may I achive it? How may I know in the event handler if the user is clicking an image or other element?

By the way, I am thinking of creating a simple component (my first component) packing the code and the CSS styling, to let others install it easily.

Is it OK for you @Kris if I copy that code in the component?

Seems like a reasonable solution?

Resize/recompress to a manner that is still satisfactory for the web experience of your visitors and community members, but not as high as print quality?

Wait a sec here …

Doesn’t max image megapixels site setting now 100% resolve the OP.

If you don’t want people stealing images for print, just reduce the megapixels here to something that is not printable. Turning this thing down to 2 megapixels would still have “ok-ish” looking images for the web but totally unprintable.


It depends on what you call usable for the web.

For us, something less than 1900 pixels in the large side is scarce for judging image quality.

You are assuming that people steal photos for printing them and it is not usually the case.

Most are used in blogs or even in new papers ot news channels.

The most effective way to protect your photo us using a clearly visible watermark that extends through most part of your photo.

It is not a solution for a forum about photography.

Making it more dificult to download the photo us not a solution, but helps.

The problem with the given code is that it prevents using right click mouse button every where, it would be great to prevent it just when you click over an image.

This is an edge case. To take protect images from download you’ll need to store them on a server specifically designed for that, perhaps allowing discourse access to a low quality image for discussion and to get the full image you’d click to the other site (which might use discourse as the SSO server) which could conceivably somehow keep people from downloading images. It’s a difficult thing to do even for a dedicated web app.

If that is really what you are after I think the best path forward is to commission a plugin on #marketplace

1 Like