Watermark Setup for Product Photos in 1C-Bitrix

Watermark Setup for Product Photos in 1C-Bitrix Every day, e-commerce owners lose traffic because competitors copy product images. A watermark is the first line of defense, and we configure it on the 1C-Bitrix platform. Our engineers, with over a decade of production experience in Bitrix (10+ yea

Our competencies:

Frequently Asked Questions

Watermark Setup for Product Photos in 1C-Bitrix

Every day, e-commerce owners lose traffic because competitors copy product images. A watermark is the first line of defense, and we configure it on the 1C-Bitrix platform. Our engineers, with over a decade of production experience in Bitrix (10+ years, 50+ successful projects), solve this end-to-end: from the built-in mechanism to custom GD processing. We integrate watermarks so they don't harm UX or slow down the site.

Optimal watermark settings: 70–80% opacity, size no more than 5% of image width. Each generated file is CDN-optimised. For 10,000 images, processing takes 15–30 minutes without site downtime. Typical project budget starts from $200.

This article covers how the built-in watermark engine in Bitrix works, when custom GD processing is needed, and how to set up caching correctly. If you need a ready solution, contact us — we'll assess your project and offer timelines from 2 to 5 days depending on complexity.

Protecting Product Images from Copying

Competitors download catalog photos and reuse them. This happens precisely because images lack a store identifier. A watermark is minimal protection but acts as a barrier against lazy copying. According to the official Bitrix documentation, watermarks can be applied via the main module settings.

Image Processing in Bitrix

All images in Bitrix go through the main module, class CFile. Resizing and conversion occur when calling CFile::ResizeImageGet() or when generating thumbnails via components. Physically processed files are cached in /upload/resize_cache/.

The watermark is not built into standard CFile. Bitrix provides class \Bitrix\Main\Diag\Image and wrapper \Bitrix\Main\IO\File, but watermark processing is implemented in a separate functionality — through the main module settings in the admin panel.

Setting Up Built-in Watermarks

In the admin panel (/bitrix/admin/settings.php?lang=en&mid=main), there is a "Watermarks" section. Parameters are saved in b_option with module main:

  • use_watermark_text — use text as watermark
  • use_watermark_image — use image
  • watermark_text — watermark text
  • watermark_text_color — color in R,G,B format
  • watermark_text_size — font size
  • watermark_position — position (TL, TC, TR, CL, CC, CR, BL, BC, BR)
  • watermark_image_path — path to image file for watermark
  • watermark_image_alpha — opacity (0–100)

The built-in mechanism applies a watermark when calling CFile::ResizeImageGet() with the $bUseWatermark = true parameter. The bitrix:catalog.element component does not pass this parameter by default — you need to explicitly specify it in the component parameters or in the template.

Steps to configure built-in watermarks:

  1. Go to Settings → Module Settings → Main.
  2. Scroll to the "Watermarks" section.
  3. Enable watermark (text or image) and set parameters.
  4. Save settings — they are stored in b_option.
  5. In your component template, set $bUseWatermark = true before calling CFile::ResizeImageGet().

Watermark position codes:

Position Code Description
TL Top Left
TC Top Center
TR Top Right
CL Center Left
CC Center
CR Center Right
BL Bottom Left
BC Bottom Center
BR Bottom Right

When to Use Programmatic GD Overlay?

For non-standard positioning or dynamic watermark content (e.g., price, date), direct GD work is used. Programmatic GD overlay offers 5x more positioning flexibility than the built-in main module (unlimited positions vs. 9).

function applyWatermark(string $sourcePath, string $outputPath): void { $info = getimagesize($sourcePath); $src = match($info[2]) { IMAGETYPE_JPEG => imagecreatefromjpeg($sourcePath), IMAGETYPE_PNG => imagecreatefrompng($sourcePath), IMAGETYPE_WEBP => imagecreatefromwebp($sourcePath), default => throw new \RuntimeException('Unsupported format'), }; $wmPath = $_SERVER['DOCUMENT_ROOT'] . '/local/watermark.png'; $wm = imagecreatefrompng($wmPath); $srcW = imagesx($src); $srcH = imagesy($src); $wmW = imagesx($wm); $wmH = imagesy($wm); // Position: bottom-right corner with 10px offset $destX = $srcW - $wmW - 10; $destY = $srcH - $wmH - 10; imagecopy($src, $wm, $destX, $destY, 0, 0, $wmW, $wmH); match($info[2]) { IMAGETYPE_JPEG => imagejpeg($src, $outputPath, 90), IMAGETYPE_PNG => imagepng($src, $outputPath), IMAGETYPE_WEBP => imagewebp($src, $outputPath, 85), }; imagedestroy($src); imagedestroy($wm); } 

The programmatic method gives more control: you can overlay text with a date, process only certain product categories, or change opacity based on background brightness. However, it requires server resources — for bulk processing, use agents.

Advanced caching details Caching is done via hash of watermark parameters. For mass processing, use an agent that iterates `b_file` by `MODULE_ID = 'iblock'` and processes files in batches of 50–100. On 10,000 images with an average size of 200 KB, processing takes 15–30 minutes on a normal server.

The Importance of Watermark Caching

The watermark should not be applied on every request. The processed image is cached in /upload/watermarked/{$fileId}/ with a filename that includes a hash of the watermark parameters. When the logo or position changes, the hash changes, and cache is invalidated automatically.

Comparison of Watermark Methods

Parameter Built-in main module Programmatic GD overlay
Ease of setup High Medium
Positioning flexibility 9 options Unlimited (5x more)
Dynamic text support No Yes
Server load Minimal Moderate (AGI)

Limitations of Watermark Protection

A watermark is only one element of protection. It doesn't prevent screenshots or manual copying. For complete protection, we recommend combining watermarks with image indexing prohibition in robots.txt, hotlink protection, and BlurHash for previews. Our certified Bitrix specialists (10+ years of experience) can implement a comprehensive solution — contact us for a consultation. Guaranteed results within the proposed timeline.

What Is Included in Watermark Setup?

  • Configuration of built-in watermark parameters in b_option for module main
  • Passing the bUseWatermark flag in catalog components
  • Custom GD overlay function for non-standard requirements
  • Cache directory /upload/watermarked/ with correct permissions
  • Agent for batch processing of existing images
  • Exclusion of certain categories or brands from watermarks
  • Documentation explaining the setup and maintenance
  • Admin access to relevant sections
  • Training materials for your team
  • 30 days of post-install support

Order watermark setup — get a free consultation on your project within an hour. Our engineers have extensive experience in Bitrix development, with 50+ successful content protection cases. Typical investment starts from $200.