A
A
alex steel2017-03-28 17:04:04
Watermark
alex steel, 2017-03-28 17:04:04

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

3 answer(s)
N
Nikolay, 2017-03-28
@zzzmaikzzz

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...

V
Vasily, 2017-07-20
@xnscripter

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);

K
kukaNuna, 2021-12-11
@kukaNuna

You can batch apply a watermark to several thousand pictures: https://ez-catalog.ru/nalojenie-vodyanogo-znaka-v-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question