Skip to content

Function: estimateMemoryMB() ​

estimateMemoryMB(width, height): number

Defined in: core/dist/image-size.d.ts:13

Peak memory a server render needs: 24 bytes per pixel, six RGBA buffers of the image, plus the runtime. Measured on Node 24: 12 wasm bytes per pixel for the heaviest stage, the decoded and the rendered image in JS, and the encoder. Lambda sizes: 12 MP needs 1024 MB, 24 MP 1769 MB, 50 MP 2048 MB.

Parameters ​

width ​

number

height ​

number

Returns ​

number