Table of Contents

Interface ITweakMedia

Namespace
ToSic.Sxc.Images
Assembly
ToSic.Sxc.dll

Tweak API for various media settings. Specifically meant for images and pictures.

Some methods such as PictureClass will only have an effect if used on Picture(...) methods.

[InternalApi_DoNotUse_MayChangeWithoutNotice("New v18.03, still WIP, especially the name could still change")]
public interface ITweakMedia

Remarks

  • Added v18.03
  • All methods return a ITweakMedia to allow chaining.

Methods

ImgAlt(string)

ITweakMedia ImgAlt(string alt)

Parameters

alt string

Returns

ITweakMedia

ImgAltFallback(string)

ITweakMedia ImgAltFallback(string imgAltFallback)

Parameters

imgAltFallback string

Returns

ITweakMedia

ImgAttributes(IDictionary<string, object>)

ITweakMedia ImgAttributes(IDictionary<string, object> attributes)

Parameters

attributes IDictionary<string, object>

Returns

ITweakMedia

ImgAttributes(IDictionary<string, string>)

ITweakMedia ImgAttributes(IDictionary<string, string> attributes)

Parameters

attributes IDictionary<string, string>

Returns

ITweakMedia

ImgAttributes(object)

ITweakMedia ImgAttributes(object attributes)

Parameters

attributes object

Returns

ITweakMedia

ImgClass(string)

ITweakMedia ImgClass(string imgClass)

Parameters

imgClass string

Returns

ITweakMedia

LightboxDescription(string)

ITweakMedia LightboxDescription(string description)

Parameters

description string

Returns

ITweakMedia

LightboxEnable(bool)

Force Lightbox to be enabled (or disabled)

ITweakMedia LightboxEnable(bool isEnabled = true)

Parameters

isEnabled bool

Optional enabled state, defaults to true

Returns

ITweakMedia

LightboxGroup(string)

Group name for lightbox. All images with the same group-name will be treated as an album.

ITweakMedia LightboxGroup(string group)

Parameters

group string

Returns

ITweakMedia

PictureAttributes(IDictionary<string, object>)

ITweakMedia PictureAttributes(IDictionary<string, object> attributes)

Parameters

attributes IDictionary<string, object>

Returns

ITweakMedia

PictureAttributes(IDictionary<string, string>)

ITweakMedia PictureAttributes(IDictionary<string, string> attributes)

Parameters

attributes IDictionary<string, string>

Returns

ITweakMedia

PictureAttributes(object)

ITweakMedia PictureAttributes(object attributes)

Parameters

attributes object

Returns

ITweakMedia

PictureClass(string)

ITweakMedia PictureClass(string pictureClass)

Parameters

pictureClass string

Returns

ITweakMedia

Resize(Func<ITweakResize, ITweakResize>)

Configure the Resize Settings.

ITweakMedia Resize(Func<ITweakResize, ITweakResize> tweak = null)

Parameters

tweak Func<ITweakResize, ITweakResize>

Tweak API to customize further settings

Returns

ITweakMedia

Resize(string, NoParamOrder, Func<ITweakResize, ITweakResize>)

Configure the Resize Settings.

ITweakMedia Resize(string name, NoParamOrder noParamOrder = default, Func<ITweakResize, ITweakResize> tweak = null)

Parameters

name string

Name of an existing configuration, such as "Lightbox". If not specified (null) will default to "Content".

noParamOrder NoParamOrder

see Convention: Named Parameters

tweak Func<ITweakResize, ITweakResize>

Tweak API to customize further settings

Returns

ITweakMedia

Resize(IResizeSettings, NoParamOrder, Func<ITweakResize, ITweakResize>)

ITweakMedia Resize(IResizeSettings settings, NoParamOrder noParamOrder = default, Func<ITweakResize, ITweakResize> tweak = null)

Parameters

settings IResizeSettings
noParamOrder NoParamOrder
tweak Func<ITweakResize, ITweakResize>

Returns

ITweakMedia

Toolbar(bool)

ITweakMedia Toolbar(bool enabled)

Parameters

enabled bool

Returns

ITweakMedia

Toolbar(IToolbarBuilder)

ITweakMedia Toolbar(IToolbarBuilder toolbar)

Parameters

toolbar IToolbarBuilder

Returns

ITweakMedia