Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Wordpress watermark plugin

Hi there -

Just wondered whether any of you experienced Wordpressies could help...

I am looking for a plugin that does two things:

1) Adds a watermark to the bottom of a photograph that has already been uploaded into Wordpress and allows for custom text,

2) Can be removed by the client if they so wish in the future (i.e. is reversible).

I have so far searched far and wide, but the closest thing I could come up with is MyWebsiteAdvisor.com's bulk watermark plugin, which permanently affects the photos.

Any suggestions, please let me know!

Robert London, UK

4 Answers

James Barnett
James Barnett
39,199 Points

Seems like you could write something in PHP that would:

John Locke
John Locke
15,479 Points

Something like that would be great. I have a site where the photo files are the product. My solution was a little time consuming, but effective. I made a copy of the image to be downloaded, added the watermark in Photoshop, used that as the Featured Image for each Product page.

Having a watermark that isn't just carefully positioned CSS is important, because clever people can still download the original image otherwise.

Matt Campbell
Matt Campbell
9,767 Points

You'd be better off writing something that, if a checkbox is ticked when a photo is saved or updated, adds a bit of CSS that positions another image, the watermark, on top of the image. Quite simple to do once you get the data saved with the photo update. But that's not overly complicated or difficult to find out.

Nathan F.
Nathan F.
30,773 Points

What's the purpose of the watermark? Just to give temporary attribution, or to discourage people from saving the images and reposting them elsewhere without attribution? Matthew's suggestion works fine if you just want to overlay some custom text on an image, but for the latter I would think the only means would be to have two copies of each image--one with a watermark and one without. That would get unwieldy pretty quickly if there are a lot of images, though.

Patrick Cooney
Patrick Cooney
12,216 Points

Oops, didn't read through the comments fully. Beat me to it. Dual copies is the only way.

Patrick Cooney
Patrick Cooney
12,216 Points

I would think you're likely not going to find anything like that either. You'd probably have to write a custom plugin. And even that way it's still not going to be exactly what you are asking for. To "remove" the watermark, you'd have to fake it. Your custom plugin would have to store the originals on the server and when someone requests an image with no watermark you'd have to retrieve the original rather than the edited one. On the most basic level, what you are asking to do is impractical if not impossible. You can't just remove pixels from a raster image. There are ways to fake it but they won't look good. I would either go with the permanent watermark or find a way to hack together a plugin for wordpress that can store both the original and the edited photo.