You are here

public function ImageStyleInterface::getPathToken in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::getPathToken()
  2. 9 core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::getPathToken()

Generates a token to protect an image style derivative.

This prevents unauthorized generation of an image style derivative, which can be costly both in CPU time and disk space.

Parameters

string $uri: The URI of the original image of this style.

Return value

string An eight-character token which can be used to protect image style derivatives against denial-of-service attacks.

1 method overrides ImageStyleInterface::getPathToken()
ImageStyle::getPathToken in core/modules/image/src/Entity/ImageStyle.php
Generates a token to protect an image style derivative.

File

core/modules/image/src/ImageStyleInterface.php, line 76

Class

ImageStyleInterface
Provides an interface defining an image style entity.

Namespace

Drupal\image

Code

public function getPathToken($uri);