Looking at my apache logs file it would suggest that you are trying to modify the .htaccess
[Fri Jan 01 12:41:05.536000 2016] [:error] [pid 1688:tid 948] [client 192.168.0.10:10715] PHP Warning: file_get_contents(C:\\wampstack\\apps\\mydomain\\htdocs/wp-content/uploads/.htaccess): failed to open stream: No such file or directory in C:\\wampstack\\apps\\mydomain\\htdocs\\wp-content\\plugins\\add-watermark\\add-watermark.php on line 235, referer: http://www.mydomain.com/wp-admin/plugins.php
My webserver is running the Bitnami WAMP stack on a Win7 Host
The .htaccess file is present in wp-content/uploads/ and your plugin has created/modified the .htaccess
### WATERMARK START
RewriteEngine On
RewriteBase /wp-content/uploads/
RewriteCond C:/wampstack/apps/mydomain/htdocs%{REQUEST_URI} -f
RewriteCond $0 ^/?(.*\.(jpe?g|png))$
RewriteCond C:/wampstack/apps/mydomain/htdocs/wp-content/plugins/add-watermark/cache//%1 -f
RewriteRule (.*) /wp-content/plugins/add-watermark/cache//$1 [L]
RewriteCond $0 ^/?(.*\.(jpe?g|png))$
RewriteCond C:/wampstack/apps/mydomain/htdocs/wp-content/plugins/add-watermark/cache//%1.nowm !-f
RewriteCond $0 !^wpcf7.*
RewriteRule (.*) ../../wp-admin/admin-ajax.php?action=watermark_image&path=$1 [L]
### WATERMARK END
It all looks to be ok but what the dashboard error upon activation of 322 characters of unexpected content is I do not know.
hope the above helps
I never tried this on Windows, seems to be a file path issue.
Are you still getting that message?
I’ll look into it.
if I deactivate and then reactiveate then yes I still get the 322 character unexpected output, though everything works fine. Well, not everything as some thumbnails that are embedded in pages/posts are not being water marked when being viewed in the page/post.
By clicking on them and opening them up into a gallery/lightbox does show the watermark but if you them close the images and refresh to page/post the thumbnails are not being watermarked. It’s not all thumbnails, just some.
I found (and probably fixed) the problem with the output on activation. After some testing, I’ll update the plugin.
That some thumbnails are not watermarked is odd. Are you sure it is not a caching issue (e.g. does it also happen when accessing the files directly or are there any other caches added by you or your hosting provider)? Do you see any relation to the size of the images?
Hi Michael.
1) Good you found a solution.
2) The thumbnails were non-standard size thumbnails that generated a while back by the plugin Simple Image Sizes plugin. I tried that plugin out 2 weeks ago to generate a different size thumbnail than the standard 150×150 that wordpress creates.
Anyway, I have deleted those thumbnails and just re-uploaded the images again and now all watermarked.