@@ -35,7 +35,7 @@ page has been rendered:
35
35
<img
36
36
src="{{ asset('image/small.png') }}"
37
37
{{ stimulus_controller('symfony/ux-lazy-image/lazy-image', {
38
- hdSrc : asset('image/large.png')
38
+ src : asset('image/large.png')
39
39
}) }}
40
40
41
41
{# Optional but avoids having a page jump when the image is loaded #}
@@ -49,16 +49,16 @@ once the page has loaded and the user's browser has downloaded the larger
49
49
image, the ` src ` attribute will change to ` image/large.png ` .
50
50
51
51
There is also support for the ` srcset ` attribute by passing an
52
- ` hdSrcset ` value to the controller:
52
+ ` srcset ` value to the controller:
53
53
54
54
``` twig
55
55
<img
56
56
src="{{ asset('image/small.png') }}"
57
57
srcset="{{ asset('image/small.png') }} 1x, {{ asset('image/small2x.png') }} 2x"
58
58
59
59
{{ stimulus_controller('symfony/ux-lazy-image/lazy-image', {
60
- hdSrc : asset('image/large.png'),
61
- hdSrcset : {
60
+ src : asset('image/large.png'),
61
+ srcset : {
62
62
'1x': asset('image/large.png'),
63
63
'2x': asset('image/large2x.png')
64
64
}
@@ -76,7 +76,7 @@ the BlurHash algorithm to create a light, blurred, data-uri thumbnail of the ima
76
76
<img
77
77
src="{{ data_uri_thumbnail('public/image/large.png', 100, 75) }}"
78
78
{{ stimulus_controller('symfony/ux-lazy-image/lazy-image', {
79
- hdSrc : asset('image/large.png')
79
+ src : asset('image/large.png')
80
80
}) }}
81
81
82
82
{# Using BlurHash, the size is required #}
@@ -134,7 +134,7 @@ Then in your template, add your controller to the HTML attribute:
134
134
{{ stimulus_controller({
135
135
mylazyimage: {},
136
136
'symfony/ux-lazy-image/lazy-image': {
137
- hdSrc : asset('image/large.png')
137
+ src : asset('image/large.png')
138
138
}
139
139
}) }}
140
140
0 commit comments