Is it possible to hook into image transforms? I have a somewhat unique thumbnail need for a certain site. I need to watermark images with custom text (per image, not globally across the site). Is there a way to hook into the Craft image transform generation logic and insert/run my own logic?

I've experimented with craft()-&gt;on('content.onSaveContent', function(Event $event) { and it seems to work okay. It will run when you save/upload the asset. The downside is that it generates the thumbnail on save, instead of on demand (using Javascript) as the native Craft transform feature does.

So, is there a different event I can hook into? Or, is there a better way to adjust the transform generation logic.
Currently it’s not possible to hook into Craft’s own thumbnail/transform generation logic. Your best bet would be to write a plugin that independently adds the watermark.

You could give the plugin a Variable class that accepts the AssetFileModel object, grabs the image, stamps it with the watermark and saves it somewhere else, returning the URL to that watermarked image, or something like that.