You are here

private function BlazyManager::buildResponsiveImage in Blazy 7

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

Build out Responsive image.

1 call to BlazyManager::buildResponsiveImage()
BlazyManager::buildMedia in src/BlazyManager.php
Build out (Responsive) image.

File

src/BlazyManager.php, line 226

Class

BlazyManager
Implements a public facing blazy manager.

Namespace

Drupal\blazy

Code

private function buildResponsiveImage(array &$attributes, array &$settings) {
  if ($mappings = picture_mapping_load($settings['responsive_image_style'])) {
    $settings['picture'] = picture_get_mapping_breakpoints($mappings, $settings['image_style']);
    $attributes['class'][] = 'media--picture';
  }
}