You are here

public function ImageStylesProviderInterface::buildDerivativeLink in Consumer Image Styles 4.x

Builds a derivative link based on the image URI and the image style.

Parameters

string $uri: The file URI.

\Drupal\image\ImageStyleInterface $image_style: The image style to apply.

Return value

array A structured array that complies with the JSON:API spec for links.

See also

https://jsonapi.org/format/#document-links

1 method overrides ImageStylesProviderInterface::buildDerivativeLink()
ImageStylesProvider::buildDerivativeLink in src/ImageStylesProvider.php
Builds a derivative link based on the image URI and the image style.

File

src/ImageStylesProviderInterface.php, line 38

Class

ImageStylesProviderInterface
Interface for consumer image style providers.

Namespace

Drupal\consumer_image_styles

Code

public function buildDerivativeLink($uri, ImageStyleInterface $image_style);