Function timeout when using next/image

We are seeing timeouts (502) for image transformations when using next/image. This seems to happen for larger png images and only when running on Netlify (not locally or elsewhere). The problem disappears when using an external loader, like Cloudinary.

The _ipx function is the one that times out it seems. Is this a bug or is there a limit for how large an image can be before the function times out?

Using "@netlify/plugin-nextjs": "^4.0.0-beta.5",

Example: https://loplabbet-web-prod.netlify.app/_ipx/w_1920,q_75/https%3A%2F%2Fsport1.azureedge.net%2Fproducts%2Fnike-cu4111-barely-volt-black-hyper-orange-volt-700_ll_no%2FQgYP7OQESmDfXq1YK1za8dKQi.png?url=https://sport1.azureedge.net/products/nike-cu4111-barely-volt-black-hyper-orange-volt-700_ll_no/QgYP7OQESmDfXq1YK1za8dKQi.png&w=1920&q=75

Logs

10:02:49 AM: 8a07ff0d Duration: 1920.52 ms	Memory Usage: 170 MB	Init Duration: 421.36 ms	
10:02:57 AM: 896cad11 Duration: 10006.22 ms	Memory Usage: 227 MB	Init Duration: 477.68 ms	
10:02:57 AM: 896cad11 ERROR  Task timed out after 10.01 seconds10:03:16 AM: de6fe943 Duration: 10010.78 ms	Memory Usage: 173 MB	
10:03:16 AM: de6fe943 ERROR  Task timed out after 10.01 seconds

Hi @jornki,

I’ve bumped the time limit of functions for that website to 26 seconds (that’s the max). Could you give this another try?

You’d have to redeploy for changes to take effect.

The problem seems to be solved by increasing the timeout for the function.
Thank you.