liip / liip/LiipImagineBundle

Watermark filter dynamic path

Open
#537 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

State: Need To Investigate 🔎
Dominant language
PHP
Stars
1.7k
Forks
386
Avg merge
1d 10h
Merged PRs (30d)
3

Description

Hi, I was trying to apply a different watermark path depending of the user who uploaded a photo, i tried with a runtimeConfig but i don't know how to do correctly.

I do this:

```
{% set runtimeConfig = {"watermark": {"size": 0.5, "image": premium.watermark, "position": 'bottomright' }} %}

```

In the config.yml i have this:

```
grid_thumb:
quality: 50
filters:
thumbnail: { size: [244, 244], mode: outbound }
```

This is the error in the profiler:

Signed url does not pass the sign check for path "PHOTO-ROUTE" and filter "grid_thumb" and runtime config {"watermark":{"size":"0.5","image":"WATERMARK-ROUTE","position":"bottomright"}}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the template's imagine_filter('grid_thumb', runtimeConfig) usage and the grid_thumb definition in config.yml, then inspect the profiler error about signed URLs and runtime configuration. Done means a user-dependent watermark path can be passed to this filter without failing the sign check.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.