<p>You'd definitely need a plugin for this. Craft's native abilities don't cover watermarks.</p>

<p>I've never attempted it myself, so these are just "best guesses"... but give the following plugins a shot:</p>

<ul>
<li><a href="https://github.com/fruitstudios/AviaryImageEditor/" rel="nofollow">https://github.com/fruitstudios/AviaryImageEditor/</a></li>
<li><a href="http://michaelrog.com/craft/imagesmith" rel="nofollow">http://michaelrog.com/craft/imagesmith</a></li>
</ul>

<p>As always, you can find a full list of existing plugins here:</p>

<blockquote>
  <p><a href="https://straightupcraft.com/craft-plugins" rel="nofollow">https://straightupcraft.com/craft-plugins</a></p>
</blockquote>

<p>If none of those work for you, you may need to develop your own custom plugin to handle it.</p>

CC BY-SA 3.0
2015-07-19T21:59:20.077Z
Thanks Lindsey. It sounds like ImageSmith might be my best bet for doing what I used to do with CE Image, so I've requested to be added to its beta testing list.
Stephen
CC BY-SA 3.0
2017-05-13T20:40:46.260Z
I'd also have a look on https://github.com/aelvan/Imager-Craft for this. My fav now.
Max Strebel
CC BY-SA 3.0
2015-07-17T16:11:38.837Z
2015-07-17T16:11:38.837Z
Lindsey D
<p>I'm wondering if something is possible in Twig/Craft CMS that I used to do in ExpressionEngine and CE Image.</p>

<p>I want to output company logo images, but as they're all different shapes and sizes, I want to merge them with a white rectangle background image so that the page looks neat and tidy, e.g. <a href="https://www.dropbox.com/s/2lvogxax2wcna1b/Screenshot%202015-07-17%2013.56.47.png?dl=0" rel="nofollow">like this</a>.</p>

<p>This is how I did this in EE (using CE Image's watermark feature, so the logo is essentially a watermark on the white background):</p>

<pre><code>{exp:ce_img:pair src="{my_logo_image}" width="250" height="150" allow_scale_larger="yes" parse="inward"}
  {exp:ce_img:single src="{my_white_rectangle_background_image}" width="300" height="200" crop="yes" allow_scale_larger="yes" watermark="{made}"}
{/exp:ce_img:pair}
</code></pre>

<p>Any ideas on how I'd do this in Craft at all? I'm not even sure where to start. I'm currently using the following, but this just outputs the logos/images, without even trying to merge them with the white rectangle background image, so any help on this would be appreciated, thanks.</p>

<pre><code>{% set thumbnailImage = {
  mode: 'fit',
  width: 300,
  height: 200,
  quality: 80
} %}


{% for asset in entry.mainImage %}
  &lt;img src="{{ asset.getUrl(thumbnailImage) }}" alt="{{ entry.title }}" /&gt;
{% endfor %}
</code></pre>

<templating><image><image-transforms>
How to add dynamic watermarks to images in Craft/Twig
# How to add dynamic watermarks to images in Craft/Twig

(Asked by: username_0 on 2015-07-17)

I'm wondering if something is possible in Twig/Craft CMS that I used to do in ExpressionEngine and CE Image.
I want to output company logo images, but as they're all different shapes and sizes, I want to merge them with a white rectangle background image so that the page looks neat and tidy, e.g. like this.
This is how I did this in EE (using CE Image's watermark feature, so the logo is essentially a watermark on the white background):
{exp:ce_img:pair src="{my_logo_image}" width="250" height="150" allow_scale_larger="yes" parse="inward"}
  {exp:ce_img:single src="{my_white_rectangle_background_image}" width="300" height="200" crop="yes" allow_scale_larger="yes" watermark="{made}"}
{/exp:ce_img:pair}

Any ideas on how I'd do this in Craft at all? I'm not even sure where to start. I'm currently using the following, but this just outputs the logos/images, without even trying to merge them with the white rectangle background image, so any help on this would be appreciated, thanks.
{% set thumbnailImage = {
  mode: 'fit',
  width: 300,
  height: 200,
  quality: 80
} %}


{% for asset in entry.mainImage %}
  
{% endfor %}

**Tags:** templating, image, image-transforms

---

## 1 answers

### Answer by username_1 on 2015-07-17. Score: 3

You'd definitely need a plugin for this. Craft's native abilities don't cover watermarks.

I've never attempted it myself, so these are just "best guesses"... but give the following plugins a shot:

* <https://github.com/fruitstudios/AviaryImageEditor/>
* <http://michaelrog.com/craft/imagesmith>

As always, you can find a full list of existing plugins here:

> <https://straightupcraft.com/craft-plugins>

If none of those work for you, you may need to develop your own custom plugin to handle it.

> **Comments:**
> **username_0**: Thanks Lindsey. It sounds like ImageSmith might be my best bet for doing what I used to do with CE Image, so I've requested to be added to its beta testing list.  
> **username_2**: I'd also have a look on https://github.com/aelvan/Imager-Craft for this. My fav now.  

---

