Added alter image url functionality to Watermark effect

Created on 14 April 2024, 7 months ago

Added hook that alters the image URL for the Watermark effect.

/**
 * Alter the image of a Watermark effect.
 *
 * @param string $uri
 *   The uri string to be altered.
 * @param \Drupal\image\ConfigurableImageEffectBase $image_effect
 *   The Watermark image effect plugin for which text need to be altered.
 */
function hook_image_effects_watermark_uri_alter(&$uri, ConfigurableImageEffectBase $image_effect) {
  // Skip if the effect is not WatermarkImageEffect or an alternative
  // implementation.
  if ($image_effect->getPluginId() !== "image_effects_watermark") {
    return;
  }
  $uri = 'my altered uri';
}
✨ Feature request
Status

Active

Version

3.6

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine bedstvie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024