Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add image watermarking #4595

bademux opened this issue Apr 8, 2018 · 3 comments · May be fixed by #5725

Add image watermarking #4595

bademux opened this issue Apr 8, 2018 · 3 comments · May be fixed by #5725


Copy link

@bademux bademux commented Apr 8, 2018

All issues related to image watermarking are closed as native image processing comes to Hugo.
Unfortunatly in image feature set I lack of image watermarking (with test or image)
As far as I can see there is a function in library used by Hugo

@bep bep added the Enhancement label Apr 8, 2018
@bep bep changed the title [FeatureRequest] Image watermarking Add image watermarking Apr 8, 2018

This comment has been minimized.

Copy link

@bep bep commented Apr 8, 2018

The hardest part about doing this is getting the API right, so I would appreciate if someone put some thought into this.


  • Should this be configured globally for all images?
  • What is a watermark? Text? Another image?
  • Etc.

This comment has been minimized.

Copy link

@bademux bademux commented Apr 13, 2018

Thanks for starting discussion about the topic.
From what I see an image lib API allows to use an image-as-watermark.
Image is reasonable solution. 'text as watermark' has a lot of variables to be handled, like font type font size, font availability, font position... and so on, I don't think it is worth to implement it, as the only benefit I see is font scalability.

In my opinion watermark have to be
defined in global config and can be
used from shorthand by watermark name or
used by watermark name as global image watermarking filter.
For global watermark filter we should be able to define what images will be processed by providing image size (width, height), image type, file name; AND operator can be used with properties (like width=60; name=* equals to images with width 60px and any name).
Watermarking filter should be applied as last one (after resizing, cropping ...).

Watermark definition should contain
name of watermark (used in filter or shorthand),
image file to be used as watermark,
x,y coordinate where to put watermark,
anchor (sometimes called gravity) - from what corner defines start of x,y pos; the beginning of watermark image should be calculated in the same way: if anchor is bottom-left, then watermark image beginning is bottom-left ,
Optionally opacity.

If watermark doesn't fit into image warning can be generated and part that fits can be used, imho

From what I understand about automatic cropping, the same (but reversed) logic can be reused for watermarking: watermark can be placed on non hot area.


This comment has been minimized.

Copy link

@stale stale bot commented Aug 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 11, 2018
@bep bep added the Keep label Aug 11, 2018
@stale stale bot removed the Stale label Aug 11, 2018
@JeanDaniel-Fischer JeanDaniel-Fischer linked a pull request that will close this issue Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.