Allow images to upscale so we can do fancy cover article images
This commit is contained in:
parent
f1f66a8e58
commit
51a594f88c
1 changed files with 2 additions and 1 deletions
|
@ -23,7 +23,7 @@ function geofresco_preprocess_page(&$variables) {
|
||||||
*
|
*
|
||||||
* In order to do an incredibly ugly hack to prevent responsive images from
|
* In order to do an incredibly ugly hack to prevent responsive images from
|
||||||
* upscaling themselves.
|
* upscaling themselves.
|
||||||
*/
|
WE DECIDED WE WANT TO ALLOW UPSCALING ON THIS SITE
|
||||||
function geofresco_preprocess_responsive_image_formatter(array &$variables) {
|
function geofresco_preprocess_responsive_image_formatter(array &$variables) {
|
||||||
$width = $variables['item']->width;
|
$width = $variables['item']->width;
|
||||||
if ($width > 1199) {
|
if ($width > 1199) {
|
||||||
|
@ -31,3 +31,4 @@ function geofresco_preprocess_responsive_image_formatter(array &$variables) {
|
||||||
}
|
}
|
||||||
$variables['responsive_image']['#attributes']['style'] = 'width: ' . $width . 'px';
|
$variables['responsive_image']['#attributes']['style'] = 'width: ' . $width . 'px';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue