function responsive_image_build_source_attributes

Helper function for template_preprocess_responsive_image().

Parameters

\Drupal\Core\Image\ImageInterface $image: The image to build the <source> tags for.

array $variables: An array with the following keys:

\Drupal\breakpoint\BreakpointInterface $breakpoint: The breakpoint for this source tag.

array $multipliers: An array with multipliers as keys and image style mappings as values.

Return value

\Drupal\Core\Template\Attribute[] An array of attributes for the source tag.

Deprecated

in drupal:8.3.0 and is removed from drupal:9.0.0.

File

core/modules/responsive_image/responsive_image.module, line 261

Code

function responsive_image_build_source_attributes(ImageInterface $image, array $variables, BreakpointInterface $breakpoint, array $multipliers) {
    return _responsive_image_build_source_attributes($variables, $breakpoint, $multipliers);
}

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