django-versatileimagefield
django-versatileimagefield copied to clipboard
Access to image field instance within sizer or filter class
Hi,
I need to add dynamic watermarks (eg: photographer name, copyright, url) into the cropped image. It's important to do it after image has been cropped because it should be scaled and uncut.
Is there a way to access image field instance from process_image
method?
Thanks
Hey @pyzenberg –
Not at the moment but its definitely possible. Let me see if I understand correctly: is the goal to grab some data from the model instance associated with that image field so you can auto-generate watermarks on an image-by-image basis?
Exactly! Though I made a little hack (#65) for my problem and it's working so far, but it would be great if you take a look on it as I'm not sure it's not a risk on performance or being unpythonnic.
Thanks
Any progress about this PR? The option to access the image field inside the process_image
method looks very attractive to me, also.