Marekki’s Watermark works fine with WordPress 2.7
Marekkis Watermark Plugin 0.8 works now fine with the new version 2.7 of WordPress. The installation is similar to the installation of 2.6. But you must insert the code in a different place! Please see step 6 of the updated installation instructions.
Have fun.
Marekki

hi, it resized the thumb watermark, thanks
take care
Hi Marekki
I would like to have image compression so I go to wm_function.php
and I found this “ImageJPEG($photoImage,$file,100);”
0-100% …. It’s a compression number,right?
Can I change number from 100 to 80 for decrease file size after watermark
I see this function between line 107-131
if(($mmPreview == “Preview”) || ($mmPreview == “NOP”)){
header(“Content-type: image/jpeg”);
ImageJPEG($photoImage,NULL,100);
}
else {
if (function_exists(‘exif_imagetype’)) {
switch(exif_imagetype($file)) {
case 2: ImageJPEG($photoImage,$file,100);break;
case 1: if (function_exists(“imagegif”)) {
ImageGif($photoImage,$file);
}
else {
ImageJPEG($photoImage,$file,100);
$filename=str_replace(‘gif’,'jpg’,$filename);
}
break;
case 3: ImagePNG($photoImage,$file);break;
}
}
else {
switch(MM_CheckFile_WM($file)) {
case “jpg”: ImageJPEG($photoImage,$file,100);break;
case “gif”: if (function_exists(“imagegif”)) {
ImageGif($photoImage,$file);
}
else {
ImageJPEG($photoImage,$file,100);
$filename=str_replace(‘gif’,'jpg’,$filename);
}
break;
case “png”: ImagePNG($photoImage,$file);break;
}
}
}
ImageDestroy($photoImage);
ImageDestroy($imageLogo);
}
I don’t know what this function can do but I think it maybe about image compression thing
thank
Hi Nadia,
you are right. The number after the $file set the quality of the output picture. This question are answered here!
“instead of 100 you can insert a other value between 0 and 100. this is the quality value in %. then lower your number then lower the quality and filesize.”
Best Wishes to Australia! And Happy New Year!
Marekki
Thanks
Happy New Year !!!!
Hey Marekki. Awesome plug-in!I had some problems when I installed the plugin. Some of the Watermark PHP files have the short open tag ( <? ) instead of the standard open tag ( <?php ), which caused me major problems with all my admin pages.The fix: Replace the instances on the first lines of all the *.php files (except for index.php, which already has the long tag).Sorry if this is repeating anything already discussed, but I Googled and couldn’t find any info on it.
Hi,
I just downloaded the plugin and checked the md5 sum. The sum is NOT the same.
Is your website / plugin hacked or did you forget to update the sum?
MD5 (watermark-0.8-with-fonts.zip) = 018db88d9546d8e9febff277a393addc
ps I found two instances of your website:
http://watermark.malcherek.com/
http://www.wp-watermark.com/
Both look the same. Advice: only use one domain. How can people see now the difference between your website and a fake phishing website (distributing hacked plugins).
Hi Marekki, can u make a option on watermark plugin to make watermark in random positions?
This is a wonderful plugin, thank you so much for it! One thing that would be nice though is to be able to resize the watermark to a certain percentage or pixels. Or if it’s possible to resize image when I upload them before the watermark is applied that would be cool too.
My main issue is that when I upload large images straight off my digital camera, the watermark I made is too tiny, but if I make the watermark bigger it is too big on smaller images.
Thanks again though, great job!
I apologize, when I read it I realized that I wasn’t clear. I mean it would be nice to resize the watermark images, I know that the text can be resized.
Is anyone aware of a problem with the watermarking of images within a directory of an addon domain?
The reason I ask is that I have space with an hosting company that allows 5 domains. I have the main domain and 1 (one) other domain added in the cpanel. The problem i have is the watermarking software will not watermark the images within the http://www.example.co.uk directory but will watermark the images outside of this……
IE: the original root directory http://www.originalexample.co.uk.
I have set up a subdomain test.example.co.uk and installed wordpress 2.7 and this plugin in and all is fine for the watermarking of images.
so basically I have a root folder of exampleoriginal.co.uk and within this is one folder ( via addon domain in cpanel ) named http://www.example.co.uk with wordpress 2.7 installed via cpanel and I also have another folder named test with wordpress 2.7 installed the same way. The test folder is the subdomain of example.co.uk and therefore recide outside of the root of example.co.uk, and is a fully functional site with watermark capabilities.
I have had correspondence with the hosting company and pointed all of the mention out to them and they say that the problem would possibly lie with the developer.
——————————————————————————————————————————
QUOTE:
“I’ve been unable to find any reason for this. The only thing I can think of is if a path setting was incorrect within the wordpress configuration but I cannot find anything obvious.
The developer may be able to solve the problem and they may have comes across the problem before.”.
—————————————————————————————————————————–
Does/has this happened to anyone else?
Cheers JohnB
There seems to be a problem with the plugin (& WP v2.7.1) when a domain is hosted on a server that has several other domains on there as well (i.e. the rootpath is not the same) or something…
I’m no techie but here’s a forumpost about it:
http://www.wp-watermark.com/forum?forum=1&topic=17&page=1
The only issue with the plugin is the fact it resizes the image AFTER the watermark is applyed.
Isn’t there any way to apply the watermark after the resizing?
It would be perfect!
thanks for your effort, however after i installed with your steps in wordpress 2.7.1, but the watermark did not show in the pics. how to slove?
Hi,
This plugin works fine but when I choose create watermark no then I get bunch of errors, imagedestory supplied argument is not valid. It does not create watermark well on animated images so I do not want to create watermark on it. There is also another bug when I deactivate the plugin it still creates the watermark. Please check these problems.
Thanks
Спасибо автору за полезную информацию
Thanks for taking a few of us.
nothing but a blank page in 2.71
wil see if the php tag is missing but doesnt work,
when i click on watermark in options takes me to a blank page
Thanks man!
Shouldn’t the media.php code be.. ?
if(function_exists(‘MM_Execute_WM’))
{
MM_Execute_WM($file,”);
}
It would be more secure and fail-safe.
Хм, к размышлению…
wow!!!!!!!!!!!!!!!!
i was just thinking about this plugin b4 week , but i hadnt the actual keywords for google, coz i had planned to search for text watermarking , great job , lots of thanks let me test and come back to u r blog again
Has anyone tried watermark with WP 2.8, I’ve just updated to WP 2.8 this morning and found out that watermark doesn’t work anymore.
go to wp-admin\includes\media.php and then line 227-228 and add the codes
// INSERT HERE!!!
MM_Execute_WM($file,”);
it should looks like
// Construct the attachment array
$attachment = array_merge( array(
‘post_mime_type’ => $type,
‘guid’ => $url,
‘post_parent’ => $post_id,
‘post_title’ => $title,
‘post_content’ => $content,
), $post_data );
// INSERT HERE!!!
MM_Execute_WM($file,”);
Thank you ismail! I totally forgot about editing this file.
The line number actually is 220-222. Confirmed that WP Watermark works in WP 2.8.
Just installed it, it works when i preview the water mark.
But when i upload new images or goto watermark a whole dir the image does not change.
Using WP 2.8 and have changed the media.php
// Construct the attachment array
$attachment = array_merge( array(
‘post_mime_type’ => $type,
‘guid’ => $url,
‘post_parent’ => $post_id,
‘post_title’ => $title,
‘post_content’ => $content,
), $post_data );
// INSERT HERE!!!
MM_Execute_WM($file,”);
Thanks in advance.
Works in wordpress 2.8?
Works for me on 2.8
great tool!
would prefer scaled watermark in some way.
the midsize image is almost impossible to see watermark.
I’ll have to play around with size to find a balance.
would also prefer to not have 2 menu items for this plugin.
After I installed this in 2.8 my image uploader is now buggy. It does not show the “uploading %” bar, and also it no longer defaults the URL for the image link to the full-sized image.
I do have other image plugins installed, and am guessing it may have broken one of them. Can you tell me how to fully revert to pre-install status – it is still broken after I deactivate the plugin.
@mark (previous comment)
Well, maybe if you want to uninstall it you should also correct the media.php file you edited at start
@twincascos
Problem is, I don’t know how the author would be able to change. I admit that I may be annoying in some cases to have part of the watermark appearing in the thumb img. But here is how the plugin work : When you upload a file, it will add the watermark on it automatically. WordPress itself only resizes the img after that step :/
Nvm, seems to be working pretty well on 2.8
Please help me. I uploaded the Plugin to WordPress 2.8 and i become this error at Image Uploading i inserted the Code why ismail said it:
Warning: imagedestroy(): supplied argument is not a valid Image resource in /homepages/27/d40153161/htdocs/xbox360freaks/wp-content/plugins/watermark/wm_functions.php on line 140
8433
I see a lot of people talking about editing the plugin files to get it to work. Any ideas on when we’ll get a plugin that just works without any editing in WordPress 2.8?
Does this only work with images uploaded to the directory? I like to use my flickr site but I was hoping to watermark them through my site.
My watermark doesn’t appear to be showing up on the picture I posted today that I uploaded from my desktop this time.
usefull plugin, i use it my several web sites, thanks Marekki
wonderful plugin ..
- see these errors :
http://www.r-sn.com/wp/archives/578
Where is the problem?
Here image Excellent :
http://www.r-sn.com/wp/archives/580
—————
suggestion :
- compress size of the image .
- Add option of image retrieval (Before edit by Watermark) .
—————
thank you
[...] 2. /wordpress/wp-admin/includes/media.php 위 파일을 열어서 안에 내용에 다음과 같은 내용을 추가합니다. 원 플러그인이 2.7 기준인데 댓글에 보니 2.8 버전에서는 227 라인 뒤인 “// Construct the attachment array 와 //Save the data” 사이에추가 하면 된다고 합니다. – http://www.wp-watermark.com/2008-12-13/marekkis-watermark-works-fine-with-wordpress-27#comment-4695 [...]
This image does not have a valid header…. and won’t run. WP 2.8.3
If my WP (http://aaa.com) and pic (http://bbb.com) are in the different host, would the plugin does work? If the answer is no, how to modify the code to make it work?
I loved reading this and I dont really like to read
thanks so much for this great plaug-in! installed it on http://www.woozybmx.com and its working perfectly! thanks again!!!!
oy!,
anyone cracked the wp2.8 issue yet? i came across to it now… and… i’m in trouble
spent couple of hours digging the source and i found only that there is no admin page for watermark (possibly coz there’s no add_options_page function) and therefore there are no settings in DB. wm_preview_options and wm_save_options field values in wp_options table looks like are holding all the values needed for this plugin to work but as there is no admin there are no fields like these. i got the watermark working with just hardcode hack.
basicly the var $imageLogo will no be created as the $wm_value_content (setup var) has no values. therefore the errormessage Uwe @ June 29th, 2009 at 12:36 described. if you put line:
$wm_value_content[0] = ‘Yes’;
to line 74 (BEFORE if($wm_value_content[0]==”Yes”) {) the watermark will appear (though in default place i think). so basically… if you don’t change you’re settings so often you can hardcode the massive and get the thing working
at lieast this is what i think
uh oh… sorry anyone! i once a f**kin’ again followed the rule: first complain, the search
once you installed the plugin it doesn’t have the settings, but in admin panel go to Settings > Watermark and add there you want the wm and save and VOILA! it works
sorry once again
Hallo,
I uploaded the plugin and I uploaded the media.php
Then I did changes in Watermark
Last I want to change Watermark-Dir, looking the right pass
enter
This happens :
You dont’t have permission to write in this directory!
whats my mistake ?
Thanks
I’ve really enjoyed reading your articles. You obviously know what you are talking about! Your site is so easy to navigate too, I’ve bookmarked it in my favourites
Any update?
I am using WordPress 2.8.6 and this plugin doesnt work for me.
Is there any update soon?
I am also using WordPress 2.8.6 and it didnt work. Waiting for the update.
think you. good job!
for me th plugin is not working. While activating the plugin it showing the error. I cant find any solution. Can you help me to install this watermark plugin. Anyone help me soon.
I am using WP 2.9 and I have been able to get this to work. You just have to make sure you put the code snippet in the correct position in the media.php file. I found two instances of similar coding where I was instructed to paste the new snippet.
The correct position should put the new code at line 225/226. I put it just below this at 282 and it did not work.
The only problem I am having, and it’s not a problem as much as a complaint/request, is that the watermark is applied before resizing making the watermark absolutely tiny. Also, I didn’t realize that it was going to be doing any resizing, here I also wish there was an option…
—————
Is there somewhere that I can move the part of the code that calls to the stempel.png file? Can I move it towards the end of the script so that it applies the stempel.png after any resizing?
corey, or anyone, would you be so kind as to post a code block with an indicator where the watermark snippett should be placed? i’m using wp v2.9.1, and would love to get this to work. the line numbers in media.php have probably changed since 2.9. thanks so much.
[...] WordPress существует отдельный плагин wp-watermark, который кстати можно использовать для массового [...]
Great job,thank you Marekki.
I install it on my linux+apache hosting ,and the plugin work well. but when I use that on a windows+iis hosting,it seems has some issue,which maybe caused by folders permission set,but I’ve modified them in plesk panel. It show me …done,but nothing happens infact with pictures. how do I do? thank you again.
Finally got this working.
This is on the latest WP 2.9.2
Oops, I guess img tags aren’t allowed
here is the screen cap:
http://coreymc.com/non-site_stuff/Screen%20shot%202010-04-10%20at%207.34.00%20PM.png
i have tried for wordpress 3 beta and it is still running and i am happy for this.
go to the media.php file in wp-admin/includes folder and then go to line 278 above this code:
// Save the attachment metadata
$id = wp_insert_attachment($attachment, $file, $post_id);
and paste the watermark plugin codes
// INSERT HERE!!!
MM_Execute_WM($file,”);
thank you the man
and take care
ow sorry i have tried again and something wrong and now i am writing true way
paste it line 225
// INSERT HERE!!!
MM_Execute_WM($file,”);
and in the watermarks dir creating watermark filename.png and go to watermark topic in the admin panel and preview and save it is all
Thanks you, best plugin for watermark
hi, i have been working long time about 45 days, and i can’t finish my blog theme and coding, i am tired. i reinstalled my blog in localhost and our lovely watermark plugin runs very well, good lock all
thank you the plugin maker take care
[...] 2. /wordpress/wp-admin/includes/media.php 위 파일을 열어서 안에 내용에 다음과 같은 내용을 추가합니다. 원 플러그인이 2.7 기준인데 댓글에 보니 2.8 버전에서는 227 라인 뒤인 “// Construct the attachment array 와 //Save the data” 사이에추가 하면 된다고 합니다. – http://www.wp-watermark.com/2008-12-13/marekkis-watermark-works-fine-with-wordpress-27#comment-4695 [...]
I made a mod to make this work with WordPress MU if anyone is interested.
Hit me up on my Forum
I upgraded to WP 3.0 and the plugin no longer works. Are you planning to update it to work for 3.0?
Hey!
Just like Kim Wolfe I am wondering if there will be an update for WP 3.0.
I tried to do the // INSERT HERE!!!
MM_Execute_WM($file,”);
addition in both places (lines ~221 and ~278)
but was unable to get it to work. Thanks for any updates! Great plugin. I would hate to have to switch to another one.
Macario
Hi, i also have a problem with WP 3.0 and Watermark 0.8, i tried the fix here in the comments is spoken about, but the plugin still don’t run with wp 3.0, i would be glad to get an update of watermark!
Please, update to wordpress 3.0!!
this plugin is really good but this plugin currently not work with wordpress 3.0 version…hope can fix it..love this plugin!!!
hey it’s not working on 3.1 please fix it.
I insert the code at line 227 in /wp-admin/includes/media.php version 3.0.1 and it still works properly
// Construct the attachment array
$attachment = array_merge( array(
‘post_mime_type’ => $type,
‘guid’ => $url,
‘post_parent’ => $post_id,
‘post_title’ => $title,
‘post_content’ => $content,
), $post_data );
// Marekki’s Watermark plug-in
MM_Execute_WM($file,”);
// Save the data
$id = wp_insert_attachment($attachment, $file, $post_id);
Yeah, after the Tom fixed, now works properly…Thanks guys
How about WordPress 3? Can’t make it work
marekkis hi:) your plugin runs perfect with wp 3.02 thank you
1- download pluing and install
2- open wp-admin/includes/media.php and paste codes line 225-226
// INSERT HERE!!!
MM_Execute_WM($file,”);
3- the codes look like:
224 ), $post_data );
225 // INSERT HERE!!!
225 MM_Execute_WM($file,”);
226 // Save the data
good luck
Works for me every time now on WordPress 3.0.3
There are 2 instances of ), $post_data ); make sure you add MM_Execute_WM($file,”); directly below the first instance, I really can’t see where you can go wrong with the excellent plugin. Thanks Marekki.
Marekki,i installed this plugin in my wordpress website which is configured with the version 3.0.4, but i am unable to see the plugin settings to change. i aslo added the code to media.php in wp_includes folder. can you please tell me what more i have to do to work with this great plugin.Thanks in advance..
Works for me every time now on WordPress 3.0.4 all though i need is to learn more about it
Wow, marvelous blog structure! How long have you ever been running a blog for? you make running a blog look easy. The total look of your site is magnificent, as smartly the content!