Home » Magento12 March 2010

Magento: Create Watermark Image

It’s very very easy to create watermark image with Magento code. The Varien_Image class does the magic.

The function watermark creates watermark on the image.

Here is the code:

Code Explanation

In the code above, you can see that I have an image named image.jpg inside media/test/ directory.
I have a watermark image named watermark.jpg.
I have set the watermark image width and height to 100px. You can omit these two functions if you don’t want to resize the watermark image.
The new image with watermark is saved inside media/test/ directory as new.jpg.

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Pingback: How To Use Camtasia Studio 6 -Tutorial()

  • sree

    Hi iam new to megento and php, would u please tell me where to implement u r code. u r code seems for for single image, how to make watermark for bulk images ?

  • Hi,

    Do you have an idea how can i make only selected images with watermarks?
    I’m using Mag and the water mark is working well but there are some categories and specific products that requires watermark. I though abt something with attribute and combining it with the water mark function (I’m not a code at all, this is an idea.)


  • Bryan

    Yes, can you show us how and where to put your code?

  • Rav

    I need some help with this

  • Jon

    It would be nice if you could tell us exactly what files we need to add that line of code to..