ImageGallery.create (Method)
Creates a new image gallery.
Returns:
ImageGalleryID (structkeylookup)
Arguments:
Name | Type | Required | Description |
---|---|---|---|
name | PlainText_NonNull_125 | Required | Name of the image gallery. |
description | PlainText_NonNull_2000 | Required | Description for the image gallery. |
defaultSubsite | SubsiteID_0 | Optional. Defaults to '0'. | ID of the default subsite for the image gallery. By default, 0 is saved which means no default subsite for the gallery. |
sizeRestrictionType | ImageGallerySizeRestrictionType | Required | The type of size restriction on images selected for the image gallery. |
isOpen | Boolean | Required | Boolean value indicating whether new images can be uploaded into the image gallery or not. |
sameSizeRule | ImageGallerySizeRestrictionRule_0 | Optional. Defaults to '0'. | Indicates the rule to apply if the image uploaded to the image gallery is of same size as the largest image specification. |
biggerSizeSameRatioRule | ImageGallerySizeRestrictionRule_0 | Optional. Defaults to '0'. | Indicates the rule to apply if the image uploaded to the image gallery is greater than the largest size specification and is of same ratio if size is constrained by aspect ratio. |
biggerSizeDiffRatioRule | ImageGallerySizeRestrictionRule_0 | Optional. Defaults to '0'. | Indicates the rule to apply if the image uploaded to the image gallery is greater than the largest size specification and is of different ratio if size is constrained by aspect ratio. |
smallerSizeSameRatioRule | ImageGallerySizeRestrictionRule_0 | Optional. Defaults to '0'. | Indicates the rule to apply if the image uploaded to the image gallery is smaller than the largest size specification and is of same ratio if size is constrained by aspect ratio. |
smallerSizeDiffRatioRule | ImageGallerySizeRestrictionRule_0 | Optional. Defaults to '0'. | Indicates the rule to apply if the image uploaded to the image gallery is smaller than the largest size specification and is of different ratio if size is constrained by aspect ratio. |
isEnforced | Boolean | Optional. Defaults to '0'. | Boolean value indicating whether the subsite selected for the gallery is enforced. |
useSiteDefaultSettings | Boolean | Optional. Defaults to '1'. | Boolean flag indicating whether the to use the site-level default settings for WebP generation of images in the gallery. |
renderWebP | Boolean | Optional. Defaults to '0'. | Boolean flag indicating whether WebP image generation is enabled or not. |
conversionType | WebPConversionType_EmtyString | Optional. Defaults to an empty string. | Type of WebP conversion - lossy or lossless. Empty string if the site defaults are used. |
qualityCompressionSpeed | Integer_0_to_100_NEG1 | Optional. Defaults to '-1'. | The compression factor for RGB channels between 0 and 100. -1 if the site defaults are used. |
Context:
License Requirements | (none) |
Permission Requirements | site:CreateImageGallery |
Deny Context | (none) |
Require Context | AuthoringEnabled |
Author Lock | (not required) |
Transaction Logging | If transaction logging is enabled at the site level, calls to this method will be logged |
Customization | This method may be customized at the site level |
Error Codes:
Code | Error Message |
---|---|
89502 | Another image gallery already exists with the same name. |
89513 | Size restriction rules cannot be saved for an image gallery having no size restrictions. |
Notes:
None