function ImageStyleInterface::buildUrl
Same name in other branches
- 9 core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::buildUrl()
- 8.9.x core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::buildUrl()
- 10 core/modules/image/src/ImageStyleInterface.php \Drupal\image\ImageStyleInterface::buildUrl()
Returns the URL of this image derivative for an original image path or URI.
Parameters
string $path: The path or URI to the original image.
mixed $clean_urls: (optional) Whether clean URLs are in use.
Return value
string The absolute URL where a style image can be downloaded, suitable for use in an <img> tag. Requesting the URL will cause the image to be created.
See also
\Drupal\image\Controller\ImageStyleDownloadController::deliver()
\Drupal\Core\File\FileUrlGeneratorInterface::transformRelative()
1 method overrides ImageStyleInterface::buildUrl()
- ImageStyle::buildUrl in core/
modules/ image/ src/ Entity/ ImageStyle.php - Returns the URL of this image derivative for an original image path or URI.
File
-
core/
modules/ image/ src/ ImageStyleInterface.php, line 61
Class
- ImageStyleInterface
- Provides an interface defining an image style entity.
Namespace
Drupal\imageCode
public function buildUrl($path, $clean_urls = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.