Manta Developers
GitHub
Menu

@manta-eu/client/shared/image

Reference for @manta-eu/client/shared/image as it is on main.

Type Aliases

ImageBox

ImageBox = object

Properties

height

height: ImageWidth

width

width: ImageWidth


ImageScope

ImageScope = object

Properties

datastoreId?

optional datastoreId?: string | null

datastorePrefix?

optional datastorePrefix?: string


ImageWidth

ImageWidth = typeof imageWidths[number]

Variables

imageWidths

const imageWidths: readonly [160, 320, 480, 640, 960, 1280, 1920]

Functions

imageBoxFor()

imageBoxFor(cssBox, devicePixelRatio?): ImageBox

Parameters

cssBox
height

number

width

number

devicePixelRatio?

number = 1

Returns

ImageBox


imagePath()

imagePath(iri, width, scope?): string

Parameters

iri

string

width

160 | 320 | 480 | 640 | 960 | 1280 | 1920

scope?

ImageScope = {}

Returns

string


imageSrcSet()

imageSrcSet(iri, scope?): string

Parameters

iri

string

scope?

ImageScope = {}

Returns

string


imageWidthFor()

imageWidthFor(cssWidth, devicePixelRatio?): 160 | 320 | 480 | 640 | 960 | 1280 | 1920

Parameters

cssWidth

number

devicePixelRatio?

number = 1

Returns

160 | 320 | 480 | 640 | 960 | 1280 | 1920


isImageWidth()

isImageWidth(value): value is 160 | 320 | 480 | 640 | 960 | 1280 | 1920

Parameters

value

unknown

Returns

value is 160 | 320 | 480 | 640 | 960 | 1280 | 1920


isResizableImageType()

isResizableImageType(mediaType): boolean

Parameters

mediaType

string

Returns

boolean


uploadedImageUrl()

uploadedImageUrl(fileUrl, box): string | undefined

Parameters

fileUrl

string

box

ImageBox

Returns

string | undefined


withImageBox()

withImageBox(href, box): string

Parameters

href

string

box

ImageBox

Returns

string