Module

image/imageupload/utils

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

module

Filtering

Functions

  • fetchLocalImage( image ) → Promise.<File>

    static

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

    Parameters

    image : Element

    Image which source to fetch.

    Returns

    Promise.<File>

    A promise which resolves when image source is fetched and converted to File instance. It resolves with a File object. If there were any errors during file processing the promise will be rejected.

  • 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