Skip to content

Function: probeImageSize() ​

ts
function probeImageSize(data): ImageSizeInfo;

Defined in: packages/minerender/src/env/browser/probeImageSize.ts:10

Minimal replacement for image-size that works in a browser.

image-size pulls in fs/path at module scope, so it can only live in the Node build. Everything MineRender loads is a PNG in practice; GIF and JPEG are handled as a courtesy and anything else falls through to an empty result, which ImageLoader rejects.

Parameters ​

ParameterType
dataUint8Array

Returns ​

ImageSizeInfo