Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want my users use different watermark on this image
but the Add Overlay (watermark) effect can onle suport filename url
can here use token like [user:picture]
thanks!
my bad english
Comments
Comment #1
dman CreditAttribution: dman commentedYou cannot use this module to provide different images to different users. The (Drupal image) system builds a version ONCE and then serves that same version to everyone who asks for it. So it cannot be used for personalized watermarking.
You would need to use a different system if you wanted to regenerate a new image for every user, every time.
#642048: No, you can't pass 'arguments' to imagecache_actions. Here's why
Comment #2
ludar CreditAttribution: ludar commentedI just set up Imagecache action that a watermark shows up on image, till there, works fine. Now i wanted that a field from user profile (profile2 module) shows up on watermark (personal watermark for every user), any ideas?
Thanks!
Comment #3
dman CreditAttribution: dman commentedDepends what you mean by user.
as long as you can calculate the *owner* of the file - eg by the ownership of the node that the file is attached to - then yes, you will be able to somehow retrive the file owners profile and find a field from there.
That will have to be done by your own php custom action, as that's not something that's available as a token automatically or anything. But not too hard hopefully.
Probably 6 lines of PHP.
And no, you can't get personalised watermarks for each *viewer* for the reasons I described above.
Comment #4
fietserwinIn fact, if the original image is a managed file, entities referring to that managed file will be available in your custom code. See the readme for the customactions submodule. Note that if you wanmt a text only watermark, the text submodule can also be used and that one does support tokens.
Comment #5
mp CreditAttribution: mp commentedi think people want a solution for that example - at least i need such one :)
content type = galleryimage
fields = title, image, copyright-text, description of the image
the user creates a new "galleryimage" and the text of the field "copyright-text" should be added to the image as watermark - is this possible?
greets
Comment #6
fietserwinSee #4, so yes this is possible with the text image effect.
Comment #7
fietserwinClosing this issue, assuming the OP has seen his question answered. If not, feel free to reopen, stating what your remaining questions are.