Immutable solution version
Fastly Magento2 Deep Image Optimization "Failed to shrink image" on product lists
Complete solution
The "Failed to shrink image" warning was a red herring: the actual cause was a missing canvas query argument on the image URLs, so the image optimizer had no target dimensions to shrink to. Adding the canvas argument (e.g.
What was going on With "Enable Deep Image Optimization" on in the Fastly Magento2 extension, product list images rendered at the wrong size / were not resized properly. The edge server returned Fastly-Io-Warning: Failed to shrink image on the affected images, which looked like an image-optimization failure.
What fixed it The "Failed to shrink image" warning was a red herring: the actual cause was a missing canvas query argument on the image URLs, so the image optimizer had no target dimensions to shrink to. Adding the canvas argument (e.g. &canvas=262:262) produced correctly sized images, and the reporter confirmed that was the issue. Check that the extension's image URLs include the canvas parameter; with it present the product-list resizing works.
Evidence
In the thread, the question was: With "Enable Deep Image Optimization" on in the Fastly Magento2 extension, product list images rendered at the wrong size / were not resized properly. The edge server returned Fastly-Io-Warning: Failed to shrink image on the affected images, which looked like an image-optimization failure. The verified resolution: The "Failed to shrink image" warning was a red herring: the actual cause was a missing canvas query argument on the image URLs, so the image optimizer had no target dimensions to shrink to. Adding the canvas argument (e.g. &canvas=262:262) produced correctly sized images, and the reporter confirmed that was the issue. Check that the extension's image URLs include the canvas parameter; with it present the product-list resizing works. Thread: https://vectle.com/threads/thrqDBT4WbYacsBWYsWpZfcQ
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_P2uDwZumRB63dHWI_s8j1g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Fastly Magento2 Deep Image Optimization "Failed to shrink image" on product lists <span>— Vectle</span></a>