On my 4.7.3 installation, the watermark is reapplied on subsequent edits, even if the image filename isn't changed - if you just change some text, the watermark is reapplied. This is a minor issue, but it does have the following side effects:

  • The watermark's transparency (alpha channel) is reduced or eliminated, since the watermark is being reapplied over itself.
  • If you changed watermark settings since originally applying the watermark, you can end up with multiple watermarks (for example, if you move the watermark location, you'll end up with two, or, if you use a different watermark image but leave the position alone, you will overlay the old watermark with the new one.)
  • Unnecessary image processing - I haven't checked this, but I suppose it could cause progressive degradation of the processed images, since it's re-saving compressed jpg files.

Comments

mcurry’s picture

I neglected to mention that I'm using the img_assist module.

--

Possible solutions:
a) Only apply watermark when a new image is uploaded during a node edit.
b) Somehow, mark the original image as having been watermarked and only apply watermark if it hasn't been applied previously.

mcurry’s picture

I just verified that this happens without img_assist installed.

kbahey’s picture

The reason this is done is that if it is done only the first time, then users could work around that and edit the node and add a different image and it will not have the watermark.

This is suboptimal, but insures a watermark for all images.

If there is a more elegant solution, it is welcome.

mcurry’s picture

Understood. I'll see if I can come up with a better solution :D

NickHBO’s picture

Priority: Minor » Normal

This is definitely an issue, but it doesn't seem that it has to be. Can you explain why inactivist's first solution does not work?

If the user is not uploading a new image file, simply do not apply the watermark to the pre-existing image again; if the user is uploading a new image file, add the watermark to it. How could this be worked around to allow the user to swap pictures without forcing a watermark?

I am assuming that this module was created for a site that has public users posting images and thus why a work around is even a concern - a completely understandable concern. However, there are plenty of sites that are read-only for visitors and for those sites, users (those who post articles) tricking the system out of watermarking is a non-issue. It would be nice to see an option like "Disable watermarking on edit" that was not checked by default; such an option allows users to opt-out of the extra protection.

Still, I think it is a bit redundant, unless I am missing an obvious workaround to inactivist's proposed solution.

Nick

druvision’s picture

Title: Watermark is reapplied every time image node is edited. » Reapply watermark to all images each time the watermark is changed

Improved design which solves the core of the issue above, and other issues as well:

Issue: new watermark only applies to new images.
Suggested solution: Re-apply the watermark to all original images each time the watermark image filename is changed. Or have an explicit re-apply botton on the settings form. This means that the original images should be saved somewhere. As a quick solution, consider having the original images (with size=_original) kept un-watermarked. Or better - if we still want to have watermarks on the original images or (if the original images are only saved when they are different then the preview-size images) add a new image size - "_without_watermark" - which will save the original image. Then the watermark can be re-applied to the original whenever the watermark is saved.

Issue: Watermark is re-applied whenever the node is saved. This causes us to have multiple watermark images on the image since the previous watermarks are never deleted.
Solution: same as before. Re-apply the watermark to the "_original" or "_without_watermark" image.

druvision’s picture

Title: Reapply watermark to all images each time the watermark is changed » prevant duplicate watermarks & reapply to all images when changed
kbahey’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

Applies to 5.x-1.x as well.

Dralspire’s picture

(drupal 5.1) I would like to take the opportunity to point out that in the context of editing a node without image changes, the watermark not only gets re-applied, but also applied to image sizes excluded from watermarking in the settings, e.g. thumbnails.

schnizZzla’s picture

Status: Active » Needs review

along with other updates, this was fixed

kbahey’s picture

Status: Needs review » Closed (duplicate)

This is solved by the code in the other issue. So marking as duplicate.