Skip to content

Instantly share code, notes, and snippets.

@risyasin
Last active March 2, 2016 15:15
Show Gist options
  • Save risyasin/0a0b9dc14eec05bf4e75 to your computer and use it in GitHub Desktop.
Save risyasin/0a0b9dc14eec05bf4e75 to your computer and use it in GitHub Desktop.
Apache2 mod_ext_filter watermark

Install imagick first!

sudo apt-get install imagick

Enable Apache2 mod_ext_filter

sudo a2enmod ext_filter

Check it:

/usr/bin/composite -gravity SouthEast watermark.gif input.jpg output.jpg

<IfModule mod_ext_filter.c>
ExtFilterDefine watermark mode=output intype=image/jpeg cmd="/usr/bin/composite -gravity SouthEast watermark.gif - -"
</IfModule>
<Location /images/watermarked>
SetOutputFilter watermark
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment