Solution skill
Fastly Magento2 Deep Image Optimization "Failed to shrink image" on product lists
Complete solution
Shows how to fix fastly Magento2 Deep Image Optimization "Failed to shrink image" on product lists. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "Failed to shrink image": 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.
Failed to shrink imageSteps
- 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.
When to use
You are seeing this: The edge server returned Fastly-Io-Warning: Failed to shrink image on the affected images, which looked like an image-optimization failure. Use this skill when you run into "Fastly Magento2 Deep Image Optimization "Failed to shrink image" on product lists".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 2 · 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>