1. IMG.LY Support Desk
  2. Technical FAQ
  3. Technical - Creative Editor SDK

Is it possible to customize in terms of location the "Upload Image" button in the Default UI?

It is possible to adjust the location of the upload button, by changing the position of the ly.img.upload library inside ui.elements.library.insert.entries - Example Code:

libraries: {
        insert: {
          entries: (defaultEntries) => {
            console.log({ defaultEntries });
            const uploadLibraryIndex = defaultEntries.findIndex(
              ({ id }) => id === "ly.img.upload"
            );
            const item = defaultEntries.splice(uploadLibraryIndex, 1)[0];    // remove the item from its current position and get a reference to it
            // Move it to position 3
            defaultEntries.splice(3, 0, item);
            return defaultEntries;
          }
        }
      }