terrorchid wrote
So I'm going to write an action script that hooks into MEDIA_SENDFILE and add an overlay/watermark on the fly. Two questions:
- My files are rather large and most imagerequests are of resized cached versions. At the point of my hook, do I get the cached filename or the original filename - i.e.: has the cache controller (or resizer) allready done his job ?
The event is called after resizing, you get both the resized and the original file name in the event data.
terrorchid wrote
- how do I get the origin of the request ? I need to find out whether the client is asking from within my site (no watermark) or from outside (watermark)
$_SERVER['HTTP_REFERER'] should hold this.