Earlier this week, our adviser voiced a strong concern regarding our photos. By posting online, the Hoofprint had effectively made it possible for readers to download our images, which was neither stamped with “Hoofprint” nor encrypted with Hoofprint authorship.
In light of this issue, Tech Team sat down to address the problem of photo downloads from our website, and that’s, in a nutshell, been our past week: working to protect our photos. Our targets range from photos to illustrations to graphics; regardless, we needed a one-step solution to cover all images.
We had several issues with stamping watermarks on our photos – the most problematic was that our website contained 9,000+ images.
Inherently, stamping this watermark manually was simply not an option. So, we looked into alternatives and dreamed up the most ideal of programs.
Files are automatically stamped with a watermark in the upload process.
This program would certainly be practical, at least in theory. The Tech Team put together a filter of sorts to intercept uploaded media and stamp them with the Hoofprint watermark. The procedure worked beautifully; however, there were two drawbacks that we had overlooked.
First, because uploaded images were stamped, those copies had been altered beyond recovery. This would certainly be the most foolproof method of protecting our images. As, if our own staff could not download originals, neither could anyone else. However, a more glaring issue arose.
In short, our previously uploaded 9,000+ photos were still unprotected. Whereas the Tech Team had provided an infallible image protection method for future development, all of our past photos remained vulnerable. Naturally, we decided to touch up on the current solution, and simultaneously rushed to brainstorm a second one.
Periodic cron jobs will automatically check for and watermark uploaded images.
Tech Team began with finding a solution to the second but more important issue. So, we ended up deciding between either a PHP (PHP Hypertext Processor) scan and watermark of all images or a cron job that periodically checked for vulnerable images. However, neither process made it past the drawing board.
To begin with, cron jobs are time-based scripts that are run automatically on the server. As a result, the program would run independent of human resources and effectively become a self-managing measure of protection.
Yet, the job would be flawed. Although the cron job would be able to cover all 9,000+ images, the time interval between uploading and processing could potentially mean a “security hole”, or at least a brief moment of vulnerability for all images. Another issue would be identification between a processed and an unprocessed image, as searching for the watermark in the photo would require an algorithm that we simply could not develop.
The PHP scan would certainly have no issues, as it was a one-time job that would cover all uploaded images. However, even when combined with the first solution, both processes still neglected the first issue – that our staff would not be able to revert converted images.
Third Time’s the Charm
In the end, we decided on a .htaccess and PHP solution, which proves capable of preserving all our original photos and of serving watermarked images.
.Htaccess is a script responsible for URL redirects, sometimes masking an old URL and automatically displaying content from a new one, or often just reloading a new webpage for the user’s convenience.
Our .htaccess simply redirects all image requests to a PHP snippet, responsible for watermarking and stamping the photo. This temporary image cache is then served to the reader, and the original image is left untouched. It was simple in concept, and after several trials, Tech Team managed to get the snippet working.
A couple tweaks.
As we develop this piece of code, Tech Team has a couple more refinements to add, in light of photo size and alignment issues.
First of the all, the watermark is cornered on the bottom-right corner of the photo. Our solution would be center the watermark and hopefully to, as a direct result, stamp the subject of the photo.
Also as an issue with size, the watermarked maintains its original dimensions when stamped, so a 500×300 stamp is hardly creates an effect when placed on a 2000×1200 image. A simple calculation would be required to paste the watermark relative to the size of the photo itself. The Hoofprint watermark’s dimensions will be anywhere from 80% – 95% of the photo’s.
Now that all Hoofprint images are protected, it looks like we’ll be safe, at least in the meantime, from duplicate content. Not that it’s been an issue in the past, but as we move to publicize our photography and the multitudes of media content that we upload, copyright infringement could be an issue. Go ahead and take a look. Those photos look magnificent with “Hoofprint” literally written on them.
Tech Team 2012
Online Hoofprint Division
Alvin Wan, Jessica You, Leon Ho, Jackie Sotoodeh