Update to Drupal 8.0.3. For more information, see https://www.drupal.org/drupal-8.0.3-release-notes
This commit is contained in:
parent
10f9f7fbde
commit
9db4fae9a7
202 changed files with 3806 additions and 760 deletions
|
|
@ -391,7 +391,7 @@ function responsive_image_build_source_attributes(ImageInterface $image, array $
|
|||
// Use the image width as key so we can sort the array later on.
|
||||
// Images within a srcset should be sorted from small to large, since
|
||||
// the first matching source will be used.
|
||||
$srcset[intval($dimensions['width'])] = file_create_url(_responsive_image_image_style_url($image_style_name, $image->getSource())) . ' ' . $dimensions['width'] . 'w';
|
||||
$srcset[intval($dimensions['width'])] = _responsive_image_image_style_url($image_style_name, $image->getSource()) . ' ' . $dimensions['width'] . 'w';
|
||||
$sizes = array_merge(explode(',', $image_style_mapping['image_mapping']['sizes']), $sizes);
|
||||
}
|
||||
break;
|
||||
|
|
@ -405,7 +405,7 @@ function responsive_image_build_source_attributes(ImageInterface $image, array $
|
|||
// be sorted from small to large, since the first matching source will
|
||||
// be used. We multiply it by 100 so multipliers with up to two decimals
|
||||
// can be used.
|
||||
$srcset[intval(Unicode::substr($multiplier, 0, -1) * 100)] = file_create_url(_responsive_image_image_style_url($image_style_mapping['image_mapping'], $image->getSource())) . ' ' . $multiplier;
|
||||
$srcset[intval(Unicode::substr($multiplier, 0, -1) * 100)] = _responsive_image_image_style_url($image_style_mapping['image_mapping'], $image->getSource()) . ' ' . $multiplier;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -495,9 +495,9 @@ function _responsive_image_image_style_url($style_name, $path) {
|
|||
}
|
||||
$entity = ImageStyle::load($style_name);
|
||||
if ($entity instanceof Drupal\image\Entity\ImageStyle) {
|
||||
return $entity->buildUrl($path);
|
||||
return file_url_transform_relative($entity->buildUrl($path));
|
||||
}
|
||||
return file_create_url($path);
|
||||
return file_url_transform_relative(file_create_url($path));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Reference in a new issue