MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / getWidthHeight

Function getWidthHeight

apps/web/ui/Message/Link/Image/utilities/image.ts:3–6  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

1import { getImageDimensionsFromUrl } from '@linen/utilities/files';
2
3export function getWidthHeight(src: string) {
4 const dimensions = getImageDimensionsFromUrl(src);
5 return calculateDimensions(dimensions);
6}
7
8interface Dimensions {
9 width: number;

Callers 1

ImageFunction · 0.90

Calls 2

calculateDimensionsFunction · 0.85

Tested by

no test coverage detected