Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Stop people copying photos off site

Go to End

11 Posts   3955 Views


Forum Moderator, 5523 Posts

29 August 2008 at 12:14pm

Well you best to explain GD then wikipedia - But put simply its a way of editing / creating / tweaking images from your code.

The silverstripe installer checks for GD2 when you install so unless you had an error when you installed you should be fine.

- Fuzz10 as to how to implement it is how your method was written. Does it save a copy of the image some where or just override the original? And also how are you uploading the images? Do you want to add the water mark to the images in the content area or are you using an upload form?. The best way would probably be to define doPublish() on your page class. and have something like

class Page extends SiteTree {
// this fires when you hit publish
function doPublish() {
return parent::doPublish()

So when you publish a page it runs off and does your water marking method.


Community Member, 791 Posts

29 August 2008 at 6:40pm

Thanks for your reply.

The problem I´m having has more to do with the fact that I cannot figure out how to use the PHP GD library to work the imagedata contained in the silverstripe image. In order for me to watermark the image , I need to be able to get the raw (GD) data out of the Silverstripe object, change it , and then place it back .. Right ?


Forum Moderator, 5523 Posts

29 August 2008 at 6:49pm

check out the class. you could create a new GD object with the filename as the constructor and knock yourself out

Go to Top