I’m working on a React.js project that uses the Img.ly SDK (CreativeEditor SDK) for image editing. I want to allow users to upload their custom images and have them appear in the editor’s upload section, so they can be selected for editing.
image – 1
I’ve successfully implemented an API that uploads the user’s images to the server, but after a page refresh, the images disappear from the editor’s upload section. I would like to fetch the uploaded images and display them in the Img.ly SDK’s media library, so they persist across sessions.
image – 2
image – 3
enter image description here
I’ve gone through the SDK documentation, but I couldn’t find a detailed example addressing this specific use case. Could anyone provide guidance or code examples to:
- Handle the upload process for custom images within the Img.ly SDK.
- Ensure the uploaded images are displayed in the SDK’s media library for editing.
- Persist the uploaded images across sessions, so they are available after a page refresh.
What I Tried:
I’ve implemented an API that uploads the user’s images to a server, and I can successfully upload images and see them in the Img.ly editor. However, after refreshing the page, the uploaded images disappear from the editor’s upload section.
What I Expected:
I expected the images to persist after refreshing the page, automatically fetching and displaying them in the Img.ly SDK’s media library.
What Happened:
The images do not persist, and the media library is empty after a refresh. I’m looking for a way to load the previously uploaded images into the media library whenever the editor is initialized.