Skip to content

Commit 5d4e57d

Browse files
authored
Merge pull request #206 from magento-cloud/MAGECLOUD-2682
Add canvas parameter to product images
2 parents 55ce149 + 9b47bed commit 5d4e57d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: Model/Product/Image.php

100644100755
+3
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ private function adjustSize()
195195

196196
$this->fastlyParameters['width'] = $this->_width;
197197
$this->fastlyParameters['height'] = $this->_height;
198+
199+
// Make sure Fastly delivers the specified size, even with letterboxing or pillarboxing.
200+
$this->fastlyParameters['canvas'] = "{$this->_width},{$this->_height}";
198201
}
199202

200203
/**

0 commit comments

Comments
 (0)