function ImageStyleInterface::getPathToken

Same name in other branches
  1. 9 core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::getPathToken()
  2. 8.9.x core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::getPathToken()
  3. 11.x 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);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.