Skip to main content
You're viewing documentation for a previous version of this software.Switch to the latest stable version

Export to Server

By default, the PhotoEditor SDK for HTML5 exports to your user's device. Learn how to disable the automatic download and export to a server instead.

To export the resulting image as an Image object or as a data url, you can use the export method:

JavaScript
editor.export(false).then(image => {
document.body.appendChild(image);
});

The export format (e.g. DataURL or Image) and file format (e.g. PNG or JPEG) can be specified using the editor configuration. See the API documentation for available RenderTypes and ImageFormats. When exporting using the DATAURL format, you can pass the resulting Data URL to a server, decode it there and write it to a file.