File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 11
11
</div >
12
12
{{ #if page.bannerUrl }}
13
13
<div class =" banner"
14
- style =" background-image: url('{{ page.bannerUrl }} ')"
14
+ style =" background-image: url('{{ cloudinary-fetch url = page.bannerUrl width = 1920 }} ')"
15
15
data-auto-id =" page-view-banner" >
16
16
</div >
17
17
{{ /if }}
Original file line number Diff line number Diff line change 11
11
</div >
12
12
{{ #if post.bannerUrl }}
13
13
<div class =" banner"
14
- style =" background-image: url('{{ post.bannerUrl }} ')"
15
- data-auto-id =" post-view-banner" >
14
+ style =" background-image: url('{{ cloudinary-fetch url = post.bannerUrl width = 1920 }} ')"
15
+ data-auto-id =" post-view-banner" >
16
16
</div >
17
17
{{ /if }}
18
18
<div class =" content" data-auto-id =" content" >
Original file line number Diff line number Diff line change @@ -23,5 +23,8 @@ function imageUrl(elementSelector) {
23
23
css ( "background-image" ) .
24
24
replace ( / [ ' " ] + / g, '' ) ;
25
25
26
- return backgroundImageStyle . substring ( 4 , backgroundImageStyle . length - 1 ) ;
26
+ const cloudinaryUrl = backgroundImageStyle . substring ( 4 , backgroundImageStyle . length - 1 ) ;
27
+
28
+ debugger ;
29
+ return cloudinaryUrl . replace ( "https://res.cloudinary.com/cloudinary-test/image/fetch/w_1920/" , "" ) ;
27
30
}
Original file line number Diff line number Diff line change @@ -23,5 +23,7 @@ function imageUrl(elementSelector) {
23
23
css ( "background-image" ) .
24
24
replace ( / [ ' " ] + / g, '' ) ;
25
25
26
- return backgroundImageStyle . substring ( 4 , backgroundImageStyle . length - 1 ) ;
26
+ const cloudinaryUrl = backgroundImageStyle . substring ( 4 , backgroundImageStyle . length - 1 ) ;
27
+
28
+ return cloudinaryUrl . replace ( "https://res.cloudinary.com/cloudinary-test/image/fetch/w_1920/" , "" ) ;
27
29
}
You can’t perform that action at this time.
0 commit comments