We have noticed that images that are displayed using Image Styles are blurry. Below are the settings we have enabled.
The original images look fine and scale accordingly when using those on the pages, but not the Images with Image Styles. How can this be resolved?
- GD2 Image Manipulation Toolkit settings: JPEG set to 100%
- ImageMagick module but the results are the same.
- We also tried to use JPEG and PNG
View mode (field setting):
- formatter = image
- Image style: Banner Image
Banner Image Image Style settings:
- Scale 1600px (W) by 900px (H)
- Allow Upscaling = false
CSS and HTML used:
<div class="banner__image" style="background-image: url('/sites/default/files/styles/banner/filename-banner.jpg')";>
.banner__image {
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
Allow Upscaling
if you're using Scale in your Image styles configuration? How are your Image styles configured? If you removebackground-size: cover;
from your CSS does the situation improve? If the area you want covered is larger than the image size it will look of a lesser quality.background-image
, we are not using the Responsive Image module which outputs the<picture>
element. Added the image style settings to the question.