Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImageStyleInterface.php

function 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);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal