feat: update styles
This commit is contained in:
@@ -47,7 +47,7 @@ class ImageTool implements ImageToolInterface
|
||||
$image = $this->manager->make($fullOldPath)
|
||||
->resize($width, $height, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
// $constraint->upsize();
|
||||
})
|
||||
->resizeCanvas($width, $height, 'center', false, null);
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ class ProductsHandler
|
||||
$mainpageProducts = $params['mainpageProducts'];
|
||||
$languageId = 1;
|
||||
$categoryName = '';
|
||||
$imageWidth = 184;
|
||||
$imageHeight = 245;
|
||||
$imageWidth = 300;
|
||||
$imageHeight = 300;
|
||||
|
||||
if ($categoryId) {
|
||||
$categoryName = $this->queryBuilder->newQuery()
|
||||
@@ -243,6 +243,8 @@ class ProductsHandler
|
||||
$languageId = 1;
|
||||
$imageWidth = 500;
|
||||
$imageHeight = 500;
|
||||
$imageFullWidth = 1000;
|
||||
$imageFullHeight = 1000;
|
||||
|
||||
$product = $this->queryBuilder->newQuery()
|
||||
->select([
|
||||
@@ -299,7 +301,7 @@ class ProductsHandler
|
||||
[$width, $height] = $this->ocImageTool->getRealSize($imagePath);
|
||||
$images[] = [
|
||||
'thumbnailURL' => $this->ocImageTool->resize($imagePath, $imageWidth, $imageHeight, 'placeholder.png'),
|
||||
'largeURL' => $this->ocImageTool->getUrl($imagePath),
|
||||
'largeURL' => $this->ocImageTool->resize($imagePath, $imageFullWidth, $imageFullHeight, 'placeholder.png'),
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'alt' => $product['product_name'],
|
||||
|
||||
Reference in New Issue
Block a user