Welcome to the Treehouse Community
Looking to learn something new?
Joseph Hall10,865 Points
Wordpress Images drag-to-desktop prevention question
Hi Treehouse, I am planning on creating a Wordpress blog, and I would like to know if it is possible to prevent the user from dragging my image(s) onto their desktop, because they pay a fee for our photograph. However, I still want them to see an image or two in the blog [ost, without letting them drag it over onto their computer.
It would be a great help! -joseph
In a word, no.
If you want to protect the intellectual property rights, a better solution is to watermark your images in low resolution and ensure your high quality photographs are paid for in advance of being shown to the end user.
Also, you may want to only send the image back via a PHP script to mask the real url so that you can ensure images are only sent back if the user is authenticated, rather than someone paying one and sharing all the image urls with his friends (they wouldn't do that would they :) ?).
Another trick I've seen is to sprite your high quality images and re-render them using css positioning so the only way to get the image is via "print screen" or hacking it together offline, but be prepared for a lot of work if you try to avoid people downloading a proper image.
I've found it's better to embed details about the author and site in the images as part of the site's branding so even it is downloaded and shared, it will be obvious to most people where it came from - including things like:
"Photograph of Miami Beach by Andrew Whitfield, found at www.site.com. SiteName! the place for Amazing Photos!." or some such.
My 2 pennies' worth :) I hope that helps.
Joseph Hall10,865 Points
Hi Andrew, Thanks for the reply! I think I'll show a video of what I am doing, and some not-as-good-as-the-ones-you-pay-for images, that way it still looks great! Joseph
marsha grasett9,995 Points
Maybe look at some top photographers' sites and see how they handle this issue, too.
Zac GordonTreehouse Guest Teacher
Another suggestion is to apply the images via CSS. People can still inspect the element and find the link, but they can't drag and drop the photos.
You may also want to check out the Sell Media plugin from the awesome folks at Graph Paper Press. They have tackled a number of the issues involved with selling photos online in one bundled plugin: http://graphpaperpress.com/plugins/sell-media/
Hope this helps! Please let us know what you decide to go with :)