Type: Function

How to get getImageDataFromImageId?


import getImageDataFromImageId from 'fontoxml-image-resolver/src/getImageDataFromImageId.js'

Get the native width, height, and image data (as data url) for an image with the given ID.

For images referenced using a permanent reference ID, first use ReferencesManager#retrieve or ReferencesManager#retrieveSingle to obtain the corresponding image ID.


  1. viewDocumentNode


    Type: HTMLDocument

    A document node in the browser's DOM, used to create a temporary img element in order to load the image.

  2. imageRemoteId


    Type: AssetId

    The remote ID of the image.

  3. referrerRemoteDocumentId


    The remote document ID of the document containing the image.

  4. variant


    Type: String

    The variant of the image to retrieve, see the documentation for the asset/preview endpoint for details.


Type: Promise<ImageData>