PHPackages                             jw\_301/jw\_watermark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jw\_301/jw\_watermark

Abandoned → [jwtue/jw\_watermark](/?search=jwtue%2Fjw_watermark)Typo3-cms-extension[Utility &amp; Helpers](/categories/utility)

jw\_301/jw\_watermark
=====================

Watermark Extension for TYPO3, adding a ViewHelper that creates watermarks.

v14.0.0(2w ago)11.8kMITPHPPHP &gt;=8.1.0CI passing

Since May 5Pushed 2w ago1 watchersCompare

[ Source](https://github.com/jwtue/jw_watermark)[ Packagist](https://packagist.org/packages/jw_301/jw_watermark)[ Docs](https://github.com/jwtue/jw_watermark)[ RSS](/packages/jw-301-jw-watermark/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

JW Watermark
============

[](#jw-watermark)

[![Latest Version](https://camo.githubusercontent.com/903d913f7d85ed6a43d90f8987daa32648dd2ef5fe69371adccee6f02eb7b366/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a777475652f6a775f77617465726d61726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jwtue/jw_watermark)

This extension adds Fluid ViewHelpers that place a watermark image on top of an image.

Supports TYPO3 v12, v13 and v14.

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:

```
$ composer require jwtue/jw_watermark

```

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Alternatively, you can install it without composer through the TYPO3 extension repository.

The two ViewHelpers
-------------------

[](#the-two-viewhelpers)

The extension provides **two** ViewHelpers. They take the same arguments and produce the same image — they differ only in what they return:

ViewHelperCorresponds toReturns````a complete `` tag`{jw:uri.watermarkedImage(...)}``{f:uri.image(...)}`the image URL only**If you are replacing an existing `f:image` or `f:uri.image` call, pick the matching one.**Every argument of the core ViewHelper works as documented for [f:image](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/typo3/fluid/latest/Image.html)and [f:uri.image](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/typo3/fluid/latest/Uri/Image.html); the `watermark*` arguments listed below are added on top.

`` also passes through any HTML attribute you set — `class`, `alt`, `title`, `loading`, `decoding`, `data`, `aria` and so on — exactly like `f:image`.

Usage
-----

[](#usage)

First import the ViewHelper namespace at the top of your Fluid template (add the second line to an existing `html` tag):

```

```

In a template without an `html` tag (a DCE template, for example) use:

```
{namespace jw=JwTue\Watermark\ViewHelpers}

```

### As an image tag

[](#as-an-image-tag)

```

```

### As a URL

[](#as-a-url)

```

```

This links to the watermarked image while the preview (rendered through a partial) stays unchanged.

### Responsive images and `srcset`

[](#responsive-images-and-srcset)

Every URL inside a `srcset` is a separate image and needs its own watermark. Replace each `f:uri.image` call with `jw:uri.watermarkedImage` — the arguments are identical.

Because a `srcset` needs several URLs inside one attribute value, nesting the calls directly gets hard to read and hard to quote correctly. Build the URLs with `f:variable` first:

```
{jw:uri.watermarkedImage(image: file, maxWidth: 768,
    watermarkSrc: '/fileadmin/Watermark.png', watermarkOpacity: '1',
    watermarkPositionVertical: 'bottom',
    watermarkWidth: 30, watermarkWidthRelative: 'long')}

{jw:uri.watermarkedImage(image: file, maxWidth: 1200,
    watermarkSrc: '/fileadmin/Watermark.png', watermarkOpacity: '1',
    watermarkPositionVertical: 'bottom',
    watermarkWidth: 30, watermarkWidthRelative: 'long')}

```

Note that the `src` attribute needs its own `watermark*` arguments — the ones inside `srcset`only apply to the URLs listed there.

Use `watermarkWidthRelative` here rather than a fixed `watermarkWidth`: the watermark then scales with each variant instead of being tiny on the large one and oversized on the small one.

### Using it with `f:media`

[](#using-it-with-fmedia)

`f:media` has no watermark counterpart, because it also renders video and audio. For images there are two options:

1. **Replace `f:media` with `jw:watermarkedImage`** if you only ever render images at that point. This is the simpler route and gives you the full set of arguments.
2. **Keep `f:media`** and watermark only the URLs you build yourself — for instance inside `additionalAttributes.srcset`, as shown above. Note that the image in the `src` attribute is then rendered by `f:media` and stays **without** a watermark.

There is no way to make `f:media` itself apply a watermark to its own `src`.

Watermark arguments
-------------------

[](#watermark-arguments)

```
watermarkSrc
watermarkTreatIdAsReference
watermarkImage

```

The same as *src*, *treatIdAsReference*, *image* from the `f:uri.image` ViewHelper, but for the watermark image.

```
watermarkOpacity

```

Opacity value for the watermark image (0=fully transparent, 1=fully opaque)

```
watermarkBackgroundColor

```

A color hex code to set a background color of the watermark

```
watermarkBackgroundOpacity

```

Opacity for the background color of the watermark (0=fully transparent, 1=fully opaque)

```
watermarkPositionHorizontal

```

Horizontal position of the watermark in the image (left/center/right)

```
watermarkPositionVertical

```

Vertical position of the watermark in the image (top/middle/bottom)

```
watermarkOffset

```

Offset from the edge in pixels (horizontally and vertically)

```
watermarkOffsetRelative

```

If set, `watermarkOffset` is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are `width`, `height`, `long`, `short`. They set the dimension that the relative value is based upon (width/height of the image, or the long/short side of the image).

```
watermarkWidth

```

Width of the watermark in pixels

```
watermarkWidthRelative

```

If set, `watermarkWidth` is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are `width`, `height`, `long`, `short`.

```
watermarkHeight

```

Height of the watermark in pixels

```
watermarkHeightRelative

```

If set, `watermarkHeight` is not interpreted as a pixel value, but as a percentage value (0-100) of the image dimensions. Possible values are `width`, `height`, `long`, `short`.

Supported formats
-----------------

[](#supported-formats)

Watermarks are applied to **JPEG, PNG, WebP and AVIF**. The alpha channel is preserved for the formats that have one (PNG, WebP, AVIF).

WebP and AVIF depend on your GD build — the extension checks `imagewebp()` and `imageavif()`at runtime and passes the image through unchanged if the function is missing, rather than failing.

Two things are worth knowing, because they are about TYPO3 and your image processor rather than about this extension:

- **TYPO3 v12 does not list `webp` and `avif`** in `$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']`; v13 and v14 do. On v12, WebP images are therefore not scaled or cropped by TYPO3 — the watermark is still applied, but at the original size. Add the extensions to `imagefile_ext` if you need scaling there.
- **Your image processor needs to understand the format.** GraphicsMagick 1.3, for instance, handles WebP but not AVIF. Where the processor cannot scale, TYPO3 hands back the original and the watermark is applied at that size.

Deliberately not supported:

- **GIF** — palette-based with at most 256 colours, so the watermark would band visibly. Worse, only the first frame of an animated GIF would survive, silently dropping the animation.
- **SVG** — a vector format that GD cannot process.

As the watermark image itself, PNG is tested and recommended. JPG may work as well; SVG is untested.

Quality is taken from the TYPO3 configuration: `jpg_quality`, `webp_quality` and `avif_quality` (the latter two exist from v13 on; the extension falls back to 85).

How caching works
-----------------

[](#how-caching-works)

The watermark parameters are part of the processing instructions handed to TYPO3, so every distinct watermark configuration produces its own processed file. The watermark is applied when TYPO3 has just (re-)generated that file, which is determined via `ProcessedFile::isUpdated()`. Cached files are served as they are.

Practical consequences:

- Changing a `watermark*` argument creates a new processed file; the old one stays until you clear the processed files.
- Clearing the processed files in the Install Tool regenerates the watermarks on the next request.
- Processed images carry **no** copyright metadata. Earlier versions wrote the site name into an IPTC field to recognise already-watermarked files; that is no longer needed and has been removed. Note that image metadata does not survive re-encoding anyway — the visible watermark is the durable marker.

Requirements
------------

[](#requirements)

- TYPO3 v12.4, v13.4 or v14
- PHP 8.1 or newer
- GD with support for the formats you use

Tested by rendering the same template on TYPO3 12.4, 13.4 and 14.3 — all four formats as both tag and URI ViewHelper, `srcset`, attribute pass-through, and a second request confirming that nothing is regenerated.

Development notes
-----------------

[](#development-notes)

The original extension — the watermark compositing and the ViewHelpers — was written by hand, without AI assistance.

Later development was carried out with [Claude Code](https://www.claude.com/product/claude-code): the TYPO3 v12 port, PNG/WebP/AVIF support, the switch to `ProcessedFile::isUpdated()` for cache detection, TYPO3 v13/v14 compatibility, and this documentation. All changes were reviewed and tested against running TYPO3 installations before release (see [AGENTS.md](AGENTS.md) for how the repository is set up for that work).

Issues and feature requests
---------------------------

[](#issues-and-feature-requests)

Please report issues and request features at [https://github.com/jwtue/jw\_watermark/issues](https://github.com/jwtue/jw_watermark/issues).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance96

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~476 days

Total

5

Last Release

20d ago

Major Versions

0.9.0 → v12.0.02024-03-04

v12.1.0 → v14.0.02026-07-21

PHP version history (2 changes)v12.0.0PHP &gt;=8.0.0

v14.0.0PHP &gt;=8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/59dce5043774a19cf0299e23ad2a3af935f0f86a8d184d0bd72512fc6e03551b?d=identicon)[jwtue](/maintainers/jwtue)

---

Top Contributors

[![jwtue](https://avatars.githubusercontent.com/u/1065702?v=4)](https://github.com/jwtue "jwtue (14 commits)")

---

Tags

watermarkTYPO3 CMSviewhelper

### Embed Badge

![Health badge](/badges/jw-301-jw-watermark/health.svg)

```
[![Health](https://phpackages.com/badges/jw-301-jw-watermark/health.svg)](https://phpackages.com/packages/jw-301-jw-watermark)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k67](/packages/friendsoftypo3-content-blocks)[yoast-seo-for-typo3/yoast_seo

Yoast SEO for TYPO3

571.8M9](/packages/yoast-seo-for-typo3-yoast-seo)[derhansen/sf_event_mgt

Event management and registration - Configurable event management and registration extension based on ExtBase and Fluid

67347.1k11](/packages/derhansen-sf-event-mgt)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40543.5k](/packages/wazum-sluggi)[brotkrueml/schema

Embedding schema.org vocabulary - API and view helpers for schema.org markup

35678.3k19](/packages/brotkrueml-schema)[jweiland/events2

Events 2 - Create single and recurring events

2168.1k3](/packages/jweiland-events2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
