You are here

public static function BlazyInterface::urlAndDimensions in Blazy 7

Same name and namespace in other branches
  1. 8.2 src/BlazyInterface.php \Drupal\blazy\BlazyInterface::urlAndDimensions()

Builds URLs, cache tags, and dimensions for an individual image.

Respects a few scenarios: 1. Blazy Filter or unmanaged file with/ without valid URI. 2. Hand-coded image_url with/ without valid URI. 3. Respects first_uri without image_url such as colorbox/zoom-like. 4. File API via field formatters or Views fields/ styles with valid URI. If we have a valid URI, provides the correct image URL. Otherwise leave it as is, likely hotlinking to external/ sister sites. Hence URI validity is not crucial in regards to anything but #4. The image will fail silently at any rate given non-expected URI.

Parameters

array $settings: The given settings being modified.

object $item: The image item.

File

src/BlazyInterface.php, line 41

Class

BlazyInterface
Defines re-usable services and functions for blazy plugins.

Namespace

Drupal\blazy

Code

public static function urlAndDimensions(array &$settings, $item = NULL);