---
title: "StyleImageMetadata | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias StyleImageMetadata

The style's image metadata

type StyleImageMetadata \= {  
    [content](#content)?: \[number, number, number, number\];  
    [pixelRatio](#pixelratio): number;  
    [sdf](#sdf): boolean;  
    [stretchX](#stretchx)?: \[number, number\]\[\];  
    [stretchY](#stretchy)?: \[number, number\]\[\];  
    [textFitHeight](#textfitheight)?: [TextFit](https://docs.maptiler.com/sdk-js/api-reference/enums/TextFit/);  
    [textFitWidth](#textfitwidth)?: [TextFit](https://docs.maptiler.com/sdk-js/api-reference/enums/TextFit/);  
}

##### Index

### Properties[](#properties)

[content?](#content) [pixelRatio](#pixelratio) [sdf](#sdf) [stretchX?](#stretchx) [stretchY?](#stretchy) [textFitHeight?](#textfitheight) [textFitWidth?](#textfitwidth)

## Properties[](#properties-1)

### `Optional`content[](#content)

content?: \[number, number, number, number\]

If `icon-text-fit` is used in a layer with this image, this option defines the part of the image that can be covered by the content in `text-field`.

### pixelRatio[](#pixelratio)

pixelRatio: number

The ratio of pixels in the image to physical pixels on the screen

### sdf[](#sdf)

sdf: boolean

Whether the image should be interpreted as an SDF image

### `Optional`stretchX[](#stretchx)

stretchX?: \[number, number\]\[\]

If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched horizontally.

### `Optional`stretchY[](#stretchy)

stretchY?: \[number, number\]\[\]

If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched vertically.

### `Optional`textFitHeight[](#textfitheight)

textFitHeight?: [TextFit](https://docs.maptiler.com/sdk-js/api-reference/enums/TextFit/)

If `icon-text-fit` is used in a layer with this image, this option defines constraints on the vertical scaling of the image.

### `Optional`textFitWidth[](#textfitwidth)

textFitWidth?: [TextFit](https://docs.maptiler.com/sdk-js/api-reference/enums/TextFit/)

If `icon-text-fit` is used in a layer with this image, this option defines constraints on the horizontal scaling of the image.
