Answer the question
In order to leave comments, you need to log in
How to make a watermark on product photos?
Recommend a plugin that will make a watermark on product photos in a woocommerce store.
I tried Product Watermark for WooCommerce but after turning it on, product pages stop loading (I use the latest flatsome template).
Manually making is not an option for several thousand goods.
Answer the question
In order to leave comments, you need to log in
https://themeisle.com/blog/watermark-images-in-wor...
https://srd.wordpress.org/plugins/image-watermark/
https://rup.wordpress.org/plugins/easy- watermark/
www.wpbeginner.com/plugins/how-to-automatically-ad...
htaccess rule with url saving and image processing on the fly:
And php itself:
$stamp = imagecreatefrompng('watermark.png');
$im = imagecreatefromstring(file_get_contents($_GET['img']));
$pc = imagesx($im) / 300;
$s_w = imagesx($stamp) * $pc;
$s_h = imagesy($stamp) * $pc;
$stamp_p = imagecreatetruecolor($s_w, $s_h);
imagealphablending($stamp_p, false);
imagesavealpha($stamp_p, true);
imagecopyresampled($stamp_p, $stamp, 0, 0, 0, 0, $s_w, $s_h, imagesx($stamp), imagesy($stamp));
$marge_right = 10;
$marge_bottom = 10;
$sx = imagesx($stamp_p);
$sy = imagesy($stamp_p);
imagecopy($im, $stamp_p, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, $sx, $sy);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question