Watermark Issue - Visible in Image Page Link - Not Visible in Direct link

CNETMEDIA

New Member
Apr 27, 2019
11
1
3
39
Hi Adam, testing testing testing the script and setting it up for production, I came across this issue, I don't know wether this is normal but it doesn't seem like it...

While the watermark is activated for the files within a given folder, if I share the Image Page Link, the watermark is displayed properly; but, if the Direct Link is accessed, the watermark is not displayed, showing the image clean and without obstructions...

Image Page Link - https://assa.devs.cnet.ws/f
Direct Link - https://assa.devs.cnet.ws/direct/view.php?s=f&/SampleJPGImage_1mbmb.jpg

The folder's setup:
Privacy: Public Limited
Password: No
Watermark: Yes
Allow Downloading when Shared: No

How can I force the watermark (when activated for the folder) to be displayed regardless the link used to view the file? So that if the download is not allowed, no image without watermark is displayed?

Thanks.
 

adam

Administrator
Staff member
Dec 5, 2009
1,785
30
48
mfscripts.com
Hi,

That's correct, the direct link is the file as-is, no changes at all. The watermark will only get added to the image previews.

You would need to amend the code to add a watermark to the direct link. You should find it all in /themes/cloudable/templates/direct/view.php

There's some watermark code examples in /plugins/filepreviewer/site/resize_image_inline.php

Thanks,
Adam.