Custom Image Library

Manage your custom image library enable or disable them from here. By default, this feature is disabled.
mailui.init({ features: { customImageLibrary: { enabled: true }, }, });

Register Listener #

If you want full control over image uploader, you can use the following callbacks for uploading image.
mailui.registerCallback( "image:customLibrary", async (params: { mediaType: string }, done: Function) => { // Add your custom logic here. // Open your image gallery, allow the user to select an image, // and then pass the selected image to the callback function 'done'. // pass image object done({ id: 1, fileName: "", src: "" }); // done(); if not select image or cancel selection } );

Params #

PropertyDescriptionTypeDefault
mediaTypeDifferent type of media can be specify
image icon
image

Callback Data #

PropertyDescriptionTypeDefault
idUnique numberany-
fileNameMedia file namestring-
srcMedia full urlstring-

Explore Our Email Builder