Watermark on multiple images

Either way would require writing code. Might as well save a step and do it directly in Glide instead of hosting code externally.

I used ChatGPT to throw together a quick outline of javascript to use. This will need to be modified to your needs. I’m including two parameters (p1 and p2). One would be the comma delimited list of urls and the other could be the watermark url or text or whatever you intend to use for a watermark.

function applyWatermarkToUrls(inputUrls, watermark) {
  // Split the comma-delimited list into an array of URLs
  const urls = inputUrls.split(',');

  // Modify each URL to apply a watermark using Cloudinary
  const modifiedUrls = urls.map(url => {
    // Modify the line below as necessary to populate a cloudinary url with the necessary parameters. 
    const modifiedUrl = `${url}?watermark=${watermark}`;
    return modifiedUrl;
  });

  // Join the modified URLs into a new comma-delimited list
  const result = modifiedUrls.join(',');

  return result;
}

return applyWatermarkToUrls(p1, p2);
3 Likes