Merge pull request #1703 from phillipcodes/bugfix-979/image-scaling
#979 fix image scaling issues
This commit is contained in:
commit
2a00d797ca
|
|
@ -9,6 +9,8 @@ class Large implements FilterInterface
|
|||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(480, 480);
|
||||
return $image->resize(480, null, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,12 @@ class Medium implements FilterInterface
|
|||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(280, 350);
|
||||
$width = 280;
|
||||
$height = 280;
|
||||
$image->resize($width, $height, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
|
||||
return $image->resizeCanvas($width, $height, 'center', false, '#fff');
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,12 @@ class Small implements FilterInterface
|
|||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(120, 120);
|
||||
$width = 120;
|
||||
$height = 120;
|
||||
$image->resize($width, $height, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
|
||||
return $image->resizeCanvas($width, $height, 'center', false, '#fff');
|
||||
}
|
||||
}
|
||||
|
|
@ -688,8 +688,8 @@ section.slider-block {
|
|||
}
|
||||
|
||||
li img {
|
||||
height: 500px;
|
||||
width:100%;
|
||||
max-height: 500px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1488,8 +1488,8 @@ section.slider-block {
|
|||
width: 100%;
|
||||
|
||||
img {
|
||||
height: 400px;
|
||||
width:100%;
|
||||
max-height: 400px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4316,17 +4316,15 @@ section.review {
|
|||
float: left;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
|
||||
&:first-child {
|
||||
padding-bottom: 20px;
|
||||
height: 50%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-top: 20px;
|
||||
height: 50%;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue