In my current Hugo page layout I am not able to work out how to make the overlay image opacity 40% and place it in the middle of the image.
# This get the watermark (an image used as overlay)
{{ $logo := resources.Get "/images/logo.jpeg"}}
# This get the image over which the watermark is placed
{{ $imagesrc := resources.Get .Params.coverImage }}
# These are some Hugo image processings to resize
{{ $img := $imagesrc.Resize "640x" }}
{{ $imgwebp := $imagesrc.Resize "640x webp" }}
# This is where I got stuck (not able to understand how to place the image centre and resize automatically and add opacity)
{{ $logoFilter := (images.Overlay $logo 50 50 ) }}
{{ $image := $img | images.Filter $logoFilter }}
{{ $imagewebp := $imgwebp | images.Filter $logoFilter }}
Thanks
Sidenote
If there is possibility that Hugo take an image and place multiple times smaller thumbnails with transparency that will also works great
It is imposible to add a static value because images are different height so even if I resize all images to 720x the height will not always be same as images are in different orientations.
is it possible the x y value which start from top left start this calculation from bottom right?
so I can place a text overlay on the bottom right of each image?
your response is too high level please dumb it down a bit, I am not sure what you mean with this. I am familiar with the .height and .Width I use it to add the height=“” and width=“” to the image. But what you mean by the
and how can I implement what you describe in this code