Next.js - Memory usage with Next/image component
harryparkes
PROOP

a year ago

I have a very simple next.js app that i'm in the process of building. As I added ~20 images the memory usage spiked from 350mb to 1.6gb. I believe this is due to image optimisations being cached in memory(?) but seems remarkably high for a few assets!

When I disable the image optimisations it returns to normal. I've tried installing sharp without improvement.

Has anyone found a solution to this? Or do I just need to commit to a 3rd party solution (e.g. cloudinary) ?

Solved

6 Replies

harryparkes
PROOP

a year ago

project id: fea11999-48bb-4ad7-a01b-02deb8c7c734


harryparkes
PROOP

a year ago

1311321262404010200


a year ago

I believe this is due to image optimisations being cached in memory(?)
that sounds in line with what ive heard

but seems remarkably high for a few assets!
thats next for you!

Has anyone found a solution to this? Or do I just need to commit to a 3rd party solution (e.g. cloudinary) ?
yep, use cloudinary, thats what we use for our docs site that is built with next!


harryparkes
PROOP

a year ago

Thanks Brody - Yep, I had a test drive with cloudinary yesterday and memory usage dropped to 200mb.


a year ago

awesome!


a year ago

!s


Status changed to Solved brody over 1 year ago


Loading...