Skip to content

Memory sizing

Peak memory is about four RGBA buffers of the image plus the runtime: estimateMemoryMB(width, height) = ceil(megapixels × 16 + 256).

ImageMegapixelsEstimateLambda size
4000 × 300012448 MB1024 MB
6000 × 400024640 MB1769 MB (a full vCPU)
8660 × 5774501056 MB2048 to 3008 MB

The core is single-threaded, so the 1769 MB tier matters for speed as much as for memory. 100 megapixels is the practical ceiling of the 4 GB wasm32 address space. The handler rejects images above limits.maxMegapixels from the header alone, before decoding.