@mocanvas/mocanvas · function
declare function readImageSize(src: string, file?: File): Promise<ImageDimensions>The pixel size of an image from its source.
Falls back to a small square rather than throwing: an image whose size cannot be read still deserves to land on the canvas, where the user can resize it, instead of the drop silently doing nothing.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.