AssetSpec
type AssetSpec: object;
Per-asset specifications assigned by the user.
Type declaration
class?
optional class: string;
When specified, adds specified class attribute to generated HTML container.
eager?
optional eager: boolean;
When set to true
the asset will be loaded eagerly (instead of default lazy). Use for above the fold content, ie initially visible w/o scrolling, such as hero image.
media?
optional media: string;
Media attribute to specify for applicable source tag. Can be used with the "merge" spec for art direction. Example below will show "wide.png" when window width is 800px or more and switch to "narrow.png" when the window width is equal to or below 799px.
Example
![?media=(min-width:800px)](/wide.png)
![?media=(max-width:799px)&merge](/narrow.png)
merge?
optional merge: boolean;
When set to true
syntax will be merged with the previous one in the document. Can be used to specify multiple sources with different specs for a single asset.
width?
optional width: number;
Width threshold for the asset content, in pixels. Overrides global width
parameter.