Lightbox and Content Theft

Lightbox is a very popular jJavascript application for displaying images on Web sites. It, along with the modifications of it and the similar scripts, produce the “fade out” effect that pushes the clicked image to the foreground, making it easier to focus on the large image and giving it more room to be displayed.

Also, since Lightbox disables or limits access to most of the right click tools, including the “save image” attribute, some Webmasters have come to think of it as a way to prevent or reduce image theft.

However, Lightbox was never designed to stop or slow down image theft. Though it is a very beautiful effect and a very effective way to display images, it is not effective at preventing users from copying images. That was never the goal of it.

In fact, there are several simple and easy means of circumventing the protections Lightbox does provide, none of which require any special knowledge or expertise.

Easily Defeated

Lightbox, as widespread as it is, does nothing to prevent users from downloading the images in a gallery. There are at least three methods that any visitor can use to download the full-sized images to their hard drive.

First, on the gallery page itself, all the user has to do is right click the thumbnail of the image and then select “save target as”. Since Lightbox galleries link directly to the larger image, pulling the javascript on the click itself, this enables the user to download the full-sized image and completely bypass the javascript effects.

Second, after one has opened the image in the Lightbox frame, all one has to do is click the image itself and drag it to their desktop or an open folder. The trick to making this work is to click before the Lightbox frame has fully loaded. After the frame is completely open, this kind of drag and drop is, in most cases, disabled.

Finally, in the same vein as the second attack, it is also possible, while the Lightbox frame is loading, to right click the image and save it that way. In both cases, the best time is after the image has loaded, but before all of the surrounding items have opened up.

In addition to those methods, it is also possible to simply take a screenshot of the image and crop it out or switch off Javascript to completely bypassing the Lightbox effect.

The bottom line is that there are many different ways to copy full images hidden in a Lightbox gallery and any site that relies on Lightbox as part of its content protection strategy needs to realize that Lightbox does not provide any actual protection.

Securing Lightbox

Those who are interested in using and securing Lightbox can take several steps to help reduce the amount of content theft they experience.

  1. Eliminate right click on gallery pages: Though very annoying to legitimate users, if you’re certain there is no valid reason to be right clicking on a page, you can disable right click on the gallery page to prevent people from saving the target. Use with great caution.
  2. Require Javascript: Since the vast majority of browsers have access to javascript, you can require it to view the gallery page. Anyone who does not have it will not be exposed to the raw images after clicking through.
  3. Use Modified Scripts: Using modified versions of Lightbox, you can embed the image in a flash file and let viewers see it that way. The prevents the full image from being exposed.

However, as powerful as those methods are, they can only address some of the ways to circumvent Lightbox. The only real way to secure Lightbox, or any gallery for that matter, is to ensure that the full image is never downloaded to the user’s computer by watermarking them before they are sent out, either on your machine or on your server.

Sadly, Lightbox, nor any other javascript gallery system, will be able to fully protect images, though they may create some frustration and confusion for lazy plagiarists.


None of this is intended to be a criticism of Lightbox. Lightbox never claimed to be nor was it ever designed to protect content. It is an interesting and practical effect, but not much more.

However, when it comes to image protection, Webmasters often times misplace their trust into techniques and methods that were never designed to stop theft. In a desperate attempt to abate very real and very reasonable worries about theft and plagiarism, some will turn to anything that even gives the vague appearance of offering protection.

Sadly, this kind of misguided trust is more dangerous than having no protection at all. If one is vulnerable and they know they are at risk, they can take precautions and seek out real methods to address the problem. If they put their faith in false protection, they do nothing but remain just as vulnerable.

Lightbox is a great script but it is important to note the limitations of it. Anyone who is relying upon it for image protection needs to be aware that it is nothing of the sort. Fortunately, there are real protection methods available and, if you wish, you do not have to remove your Lightbox effect to use them.

It just requires some advance planning and preparation.

Want to Reuse or Republish this Content?

If you want to feature this article in your site, classroom or elsewhere, just let us know! We usually grant permission within 24 hours.

Click Here to Get Permission for Free