News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM2 - Picture Watermark

Started by Zekule, February 22, 2012, 14:19:25 PM

Previous topic - Next topic

Zekule

Is there any way or code to insert a watermark on the product pictures?

Thanks.

morktron

Yes, you can do it with Magic Zoom Plus, you have to pay for it but it's worth it since they have great support and it all works for VM2.5 - unlike most things!

I have it working on this site in development - only for the product fly pages though

shyntaxx

#2
This is a prefectly easy and free solution for watermaking images :::

Apply Watermark image into Product Image of Virtuemart

Problem: When Creating an shopping website, we would like to apply a watermark image - logo and website name - on every picture of products. It is seem easy by this way: use an watermark program to apply icon on product picture, then upload that picture on hosting. Take a long time if you have over 50 products.
I want to do this work automatically, It means watermark picture will be applied in to all picture (old and new) of website

Solve: I do this work on Joomla 2.5 and Virtuemart 2.0. But I think it is comfortable for every happen load and show Image.
Step 1: Create file .htaccess on folder contain image, with Virtuemart 2.0, this folder is <your_domain>/images/stories/virtuemart/product.



RewriteRule ^(resized)($|/) - [L]

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f

RewriteRule \.(gif|jpeg|jpg|png)$ watermark.php [QSA,NC]


Step 2: Create file watermark.php at same folder of .htaccess with content:


<?php

// watermark.php
// Path the the requested file

$path = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
// Load the requested image

$image = imagecreatefromstring(file_get_contents($path));$w = imagesx($image);$h = imagesy($image);
// Load the watermark image

$watermark = imagecreatefrompng('watermark.png');$ww = imagesx($watermark);$wh = imagesy($watermark);
// Merge watermark upon the original image (centred)

imagecopy($image, $watermark, (($w/2)-($ww/2)), (($h/2)-($wh/2)), 0, 0, $ww, $wh);

// Send the image

header('Content-type: image/jpeg');imagejpeg($image,null,95);
exit();?>

Step 3: Create an watermark.png with transparent background and upload to that folder.
Done.
Now you can test all image file in folder <your_domain>/images/stories/virtuemart/product have watermark if you call them on your website

Note: the code line RewriteRule ^(resized)($|/) - [L] in .htaccess file ensure that all thumbnail file in resized folder will be not watermarked. If you want to watermark on both thumbnail and large picture, you can remove that line

CREDITS: mtkcode.blogspot.hu/2013/07/apply-watermark-image-into-product.html

fkeller

My VM3 product pictures are NOT in:

Quote<your_domain>/images/stories/virtuemart/product.

So if it isn't working for you try to put everything in:

<your_domain>/images/virtuemart/product


jenkinhill

Four years ago, when the old thread you posted to was written, Joomla was at J2.5 and VM was at VM2.0  Things have changed since then!

The stories folder has been removed from Joomla 3 so VM product images are now stored in images/virtuemart/product
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

marvays

iTS NO GOOG SOLUTION.
you need to protect large images / product, not small product / resized thumbnails. . . so this works exactly the opposite of what is logical.

pinochico

QuoteThis is a prefectly easy and free solution for watermaking images :::

Perfectly easy solution only for mad customers :)
If I send feed with pictures with watermarks to the Google Merchant Centre, all products are banned.

"Before I use my brain, I shake my head"
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

Quote from: pinochico on August 10, 2020, 18:13:04 PM
If I send feed with pictures with watermarks to the Google Merchant Centre, all products are banned.
You're right. I would solve this by pasting watermark on the original large images from the /product folder. I can send images from the /product/resized folder to merchant centers and other similar services where the images are 300x300 and will not have a watermark.

It would also be possible to render a copy of the original images without watermark in a folder with a random name and send it to google merchant centers. The visitor would not find this folder.

There are many ways to do this. Just not this first one, when the big picture will be clean and the small one will have a watermark. Because thieves want a big picture :)

pinochico

QuoteI can send images from the /product/resized folder to merchant centers and other similar services where the images are 300x300 and will not have a watermark.

QuoteIt would also be possible to render a copy of the original images without watermark in a folder with a random name and send it to google merchant centers. The visitor would not find this folder.

QuoteThere are many ways to do this.

Martine,

really do you understand, how function really ecommerce bussines, not funny eshops?
Really do you send in Google Nákupy only picture 300x300px - is really the best solution for your eshop, if I find the same products on another eshops with clean picture 600x600 or 900x900px?
Really do you understand how google control information in feed on live eshop (not only in feed, but on live eshop too with their application with selenium scripts)?

I think all posts with many ways how use watermark is not for me or not for really ecommerce bussiness.

Take my posts only as information and do it how do you want... our eshops is not my eshops :)

Best Regards
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

Quote from: pinochico on August 10, 2020, 21:11:06 PM
***

Yes, I know how real e-shops work. And I know, how google shopping works. And you? :)

Product data specification:
https://support.google.com/merchants/answer/7052112?visit_id=1-636241173656719253-177496481&rd=1&hl=en

When you look at google purchases, you will see that google displays the largest image in 300x300 resolution.

image_ link
For non-apparel products, use an image of at least 100 x 100 pixels
For apparel products, use an image of at least 250 x 250 pixels

But this is not about how big an image I send to google purchases, but that I can show the visitor an image with a watermark and google send an image of any size without a watermark. And all because of the photo thieves.

pinochico

But google control your information on feed and send you back info, that your product is banned because picture is with watermark (not in feed, but on live eshop)...
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

pinochico

QuoteFor non-apparel products, use an image of at least 100 x 100 pixels
For apparel products, use an image of at least 250 x 250 pixels

Again :)
And maybe czech?

Martine, jak myslíš že bude bussinesově úspěšný eshop, který posílá do GMC fotky jen o velikosti 300x300px (resized), když v Google nákupech najdu stejné produkty s krásnou velkou fotkou?
Mám 2 minuty abych se rozhodl.
At least == nejméně.

Martin, how do you think it will be a successful business e-shop that sends photos to GMC only 300x300px (resized), when I find the same products with a beautiful big photo in Google Merchant Centre?
I have 2 minutes to decide.

And I think I wrote all what I want :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

Větší fotku než 300x300 v google nákupech nenajdeš. A máš spíš dvě vteřiny, než dvě minuty :)
Daleko větší problém je heureka či zbožíCZ . . . protože tam jsou obrázky daleko větší. A tím se dostáváme do začarovaného kruhu. Použít velkou krásnou fotku, kterou jsem si nechal draze nafotit a vím, že mi ji konkurence ukradne? Nebo na webu použít tuhle krásnou fotku s vodoznakem a do srovnávačů zboží poslat bez vodoznaku, ale v menším rozlišení, abych výrazně omezil zneužití?

marvays

And . . . . I came up with another solution. Upload the first photo without a watermark, more photos with a watermark. Create a hack and hide the display of the first photo on the product detail page. Is it possible to create such a hack?