This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a new gallery.
You can create your own gallery by providing the gallery information, or clone an existing gallery using the ID of that existing gallery. When a gallery is cloned, the newly-created gallery includes the same properties as the existing gallery except for the gallery and item IDs, sort order, and created and updated dates.
The newly-created gallery is only available on your backend, and doesn't appear on your live site. To display your backend gallery on your live site, you need to connect it to a gallery component on your live site. To do this, import the createGallery()
function to your page code, and write code to convert the backend gallery object to the frontend gallery component object. Once converted, the newly created backend gallery is visible on your live site. For reference, check out the code example, "Create a gallery and display it on your live site". To learn more, see Displaying a Pro Gallery on Your Site Using the Pro Gallery Backend API.
Important:
When creating image
items in your gallery, the images must be uploaded to the Wix Media Manager first as the imageInfo
parameter currently only supports the Wix media URL.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
Options to use when creating the gallery.