1
- namespace Our . Umbraco . TagHelpers . Configuration
1
+ using Our . Umbraco . TagHelpers . Enums ;
2
+
3
+ namespace Our . Umbraco . TagHelpers . Configuration
2
4
{
3
5
public class OurUmbracoTagHelpersConfiguration
4
6
{
5
7
public InlineSvgTagHelperConfiguration OurSVG { get ; set ; } = new InlineSvgTagHelperConfiguration ( ) ;
8
+ public ImgTagHelperConfiguration OurImg { get ; set ; } = new ImgTagHelperConfiguration ( ) ;
6
9
}
7
10
8
11
public class InlineSvgTagHelperConfiguration
@@ -11,4 +14,47 @@ public class InlineSvgTagHelperConfiguration
11
14
public bool Cache { get ; set ; } = false ;
12
15
public int CacheMinutes { get ; set ; } = 180 ;
13
16
}
17
+
18
+ public class ImgTagHelperConfiguration
19
+ {
20
+ /// <summary>
21
+ /// Define the typical responsive breakpoints (S,M,L,XL,XXL) in which your website uses during screen resize
22
+ /// </summary>
23
+ public MediaQuerySizes MediaQueries { get ; set ; } = new MediaQuerySizes ( ) ;
24
+
25
+ /// <summary>
26
+ /// If true, let the browser handle image lazy loading, otherwise disable to use a 3rd party JavaScript based library
27
+ /// </summary>
28
+ public bool UseNativeLazyLoading { get ; set ; } = true ;
29
+
30
+ /// <summary>
31
+ /// Applicable if UseNativeLazyLoading is false
32
+ /// </summary>
33
+ public string LazyLoadCssClass { get ; set ; } = "lazyload" ;
34
+
35
+ /// <summary>
36
+ /// Applicable if UseNativeLazyLoading is false
37
+ /// </summary>
38
+ public ImagePlaceholderType LazyLoadPlaceholder { get ; set ; } = ImagePlaceholderType . SVG ;
39
+
40
+ /// <summary>
41
+ /// Applicable if UseNativeLazyLoading is false & LazyLoadPlaceholder is LowQualityImage
42
+ /// </summary>
43
+ public int LazyLoadPlaceholderLowQualityImageQuality { get ; set ; } = 5 ;
44
+ public bool ApplyAspectRatio { get ; set ; } = false ;
45
+ public bool MobileFirst { get ; set ; } = true ;
46
+
47
+ /// <summary>
48
+ /// The property alias of the media type containing the alternative text value.
49
+ /// </summary>
50
+ public string AlternativeTextMediaTypePropertyAlias { get ; set ; } = "alternativeText" ;
51
+ }
52
+ public class MediaQuerySizes
53
+ {
54
+ public int Small { get ; set ; } = 576 ;
55
+ public int Medium { get ; set ; } = 768 ;
56
+ public int Large { get ; set ; } = 992 ;
57
+ public int ExtraLarge { get ; set ; } = 1200 ;
58
+ public int ExtraExtraLarge { get ; set ; } = 1400 ;
59
+ }
14
60
}
0 commit comments