Report an issue
Module

image/imageupload/utils

@ckeditor/ckeditor5-image/src/imageupload/utils

module

Filtering

Functions

  • fetchLocalImage( image ) → Promise

    static

    Creates a promise which fetches the image local source (base64 or blob) and returns as a File object.

    Parameters

    image : Element

    Image which source to fetch.

    Returns

    Promise

    A promise which resolves when image source is fetched and converted to File instance. It resolves with object holding initial image element (as image) and its file source (as file). If the file attribute is null, it means fetching failed.

  • isImageType( file ) → Boolean

    static

    Checks if a given file is an image.

    Parameters

    file : File

    Returns

    Boolean
  • isLocalImage( node ) → Boolean

    static

    Checks whether given node is an image element with local source (base64 or blob).

    Parameters

    node : Node

    Node to check.

    Returns

    Boolean