Class AddonSettings
Represents configuration such as default breakpoints and rendering settings.
Implements
Inherited Members
Namespace: AdaptiveImages.Configuration
Assembly: AdaptiveImages.dll
Syntax
public class AddonSettings : IAddonSettings
Constructors
AddonSettings()
Creates an instance with default settings
Declaration
public AddonSettings()
Properties
CmsImageProviderName
Gets or sets the name of the image provider for images uploaded in the CMS, i.e. EPiServer.Core.ImageData images.
Declaration
public string CmsImageProviderName { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultProviderName
Gets or sets a default provider name to fall back to if an adaptive image property does not have its provider property set.
Declaration
public string DefaultProviderName { get; set; }
Property Value
Type | Description |
---|---|
string |
DisableImageCache
Gets or sets whether image caching should be disabled.
Declaration
public bool DisableImageCache { get; set; }
Property Value
Type | Description |
---|---|
bool |
DisableSoftLinks
Gets or sets whether soft links should be stored for CMS images.
Declaration
public bool DisableSoftLinks { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
If set to true, no soft links will be saved for CMS images, meaning there will be no warning if trying to delete an image that has been used with a SingleImage or AdaptiveImage property.
DiskCache
Determines whether disk caching should be enabled.
Declaration
[Obsolete("This property should no longer be used. To disable disk caching, set DisableImageCache to true or switch to another caching option, for example the AdaptiveImages.Azure package.")]
public bool DiskCache { get; set; }
Property Value
Type | Description |
---|---|
bool |
DiskCachePath
Absolute or app-relative path to folder to use for image caching on disk, if enabled.
Declaration
public string DiskCachePath { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Image caching on disk is enabled by default, but may be disabled through the DisableImageCache property or by switching to a different image cache implementation, such as the AdaptiveImages.Azure package.
EditableFilenames
Gets or sets whether users are allowed to edit filenames for image properties.
Declaration
public bool EditableFilenames { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This is commonly used if the image provider and/or URL builder supports vanity filenames for SEO purposes.
Enabled
Gets whether the add-on has been enabled during startup through services.AddAdaptiveImages()
Declaration
public static bool Enabled { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This property is for example used to determine whether editor descriptors should be registered, if content should be validated, etc
HideMediaComponent
Gets or sets whether the media component should be hidden even if there are one or more searchable image providers.
Declaration
public bool HideMediaComponent { get; set; }
Property Value
Type | Description |
---|---|
bool |
LargeBreakpoint
Gets or sets the breakpoint in pixels for the large form factor.
Declaration
public int LargeBreakpoint { get; set; }
Property Value
Type | Description |
---|---|
int |
LargeWidth
Gets or sets the default width of rendered images for the Large form factor.
Declaration
public int LargeWidth { get; set; }
Property Value
Type | Description |
---|---|
int |
LaxValidationOfPublishedImages
Gets or sets whether validation errors for published images, for example migrated properties, should result in non-blocking warnings unless property value has changed.
Declaration
public bool LaxValidationOfPublishedImages { get; set; }
Property Value
Type | Description |
---|---|
bool |
MaxAllowedFilesize
Gets or sets a maximum original image filesize in KB supported for transformation. Setting this value limits the maximum allowed size of images drag-and-dropped to image properties.
Declaration
public int MaxAllowedFilesize { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
Zero means no limitation.
MaxCropDialogImageWidth
Gets or sets the maximum image width rendered in the crop dialog, commonly used to improve performance for very large original images.
Declaration
public int MaxCropDialogImageWidth { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
0 means original images will be loaded in their native size in the crop dialog.
MaxSearchResultSize
Gets or sets the maximum number of search result hits to initially display in the image bank component.
Declaration
public int MaxSearchResultSize { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
Applies to provider options without search result paging setting.
MaxWidth
Gets or sets the default maximum width of rendered images.
Declaration
public int MaxWidth { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
Does not apply when explicitly rendering an ImageRenderSettings instance.
MediumBreakpoint
Gets or sets the breakpoint in pixels for the medium form factor, anything below is considered the smallest form factor.
Declaration
public int MediumBreakpoint { get; set; }
Property Value
Type | Description |
---|---|
int |
MediumWidth
Gets or sets the default width of rendered images for the Medium form factor.
Declaration
public int MediumWidth { get; set; }
Property Value
Type | Description |
---|---|
int |
RenderAccordingToSizeConstraintByDefault
Gets or sets whether default rendering limits image size according to size constraints.
Declaration
public bool RenderAccordingToSizeConstraintByDefault { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
For example, if the minimum width for the Large form factor is 400px, the image will be rendered 400px wide even if the original image or cropping is larger.
SmallWidth
Gets or sets the default width of rendered images for the Small form factor.
Declaration
public int SmallWidth { get; set; }
Property Value
Type | Description |
---|---|
int |