What's up with the closing of topic?

Continuing the discussion from Using 3rd party tools with Hugo?:

Hi @bep

it is my copyrighted images I am just going to replace the older logo watermark with the new logo watermark nothing illegal here. Just wondering how to make it work with Hugo while keeping the build times short.

Thanks

Closing the topic

I do not know what bed is but can just anyone close a topic they don’t like? what is the purpose to have a community if I cannot even ask a question?

You have to do that outside of Hugo. As a brief search on the forum would have told you, Hugo does not allow executing arbitrary tools.

I’d use whatever to change the watermark and copy the final images (with the new watermark, preferably) to your project folder(s). Doing that kind of stuff should be a one-time task, not something that has to be repeated with every build.

1 Like

Hi @chrillek

In this case should I use if param old watermark = true > then remove watermark or is there a better way?

Thanks

The question makes no sense. Take your images, change the watermark, copy them to where you want them. All this with some command line tool or some other utility that can batch process images.

Then all images have the new watermark, and you don’t need any parameters in your front matter to check for the old one.

1 Like

Hi @chrillek

Unfortunately for me, The listings are submitted by agents using decap cms of netlify, they do not know how to use command line tool and it makes much more sense for me to include this in Hugo and let Hugo run this if possible? Since Hugo is already handling the part where it adds watermark on the images.

Thanks

You can pull their images to your local machine and run the image transformations on the command line there… then push everything back to the website. Easy peasy. I would store these watermarked images in a separate directory for convenience reasons.

1 Like

Hi @jhvanderschee

Thanks for the feedback, however the manual labour makes no sense since netlify cms and Hugo automatically build the site on change why not just also let it handle the image processing? if possible ofcourse.

Or are you saying it is not something I should do using Hugo?

thanks

You could try to run the script you mentioned in your Netlify container… That is similar to pulling it manually to you local machine. The (script in the) container can then execute the code. I would not let Hugo do this. I would let my virtual machine (Netlify container) do this on/during the deploy.

1 Like

Involving arbitrary third party softwares as in a batch script would cool, but is just not possible yet. Also it might impact build times quite a lot. In your case, it’s simpler to run a script on your images before building. As for the topic closing, no, not “everyone” can do it, also, I don’t think my most idiot or angry topics have been shut down, so that should tell you something about yours perhaps…

2 Likes

thanks @jhvanderschee

Thanks for providing this solution didnt knew it existed.

got it

but I didn’t made angry post! it might be stupid but as a beginner I can’t ask sophisticated question because I am confused with Hugo. and I can’t take all the blame because the documentation is actually a mess comparing to for example next.js but anyways

Thanks again @Tom_Durand @jhvanderschee for taking the time to explain in detail.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

It was close because

  • It’s not something that Hugo does
  • And it sounds like a “one time job” that does not belong in the Hugo build even if we had support for it.
  • Also, it sounded a little suspicous re. copyright