File tree 3 files changed +6
-14
lines changed
3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,9 @@ public function getCName()
84
84
*/
85
85
public function buildUrl ($ inputUrl )
86
86
{
87
+ $ baseUrl = "// " . $ this ->getToken () . ".cloudimg.io/ " ;
87
88
if (!empty ($ this ->getCName ())) {
88
- $ baseUrl = "// " . $ this ->getCName () . "/ " ;
89
- } else {
90
- $ baseUrl = "// " . $ this ->getToken () . ".cloudimg.io/ " ;
89
+ $ inputUrl = str_replace ($ this ->getCName (), "" , $ inputUrl );
91
90
}
92
91
93
92
if (!$ this ->isRemoveV7 ()) {
Original file line number Diff line number Diff line change @@ -107,16 +107,9 @@ public function processHtml($html)
107
107
108
108
$ imageSrc = $ element ->getAttribute ('src ' ) . $ quality ;
109
109
110
- if (!empty ($ this ->config ->getCName ())) {
111
- if (stripos ($ imageSrc , $ this ->config ->getCName ()) === false ) {
112
- $ ciSrc = $ this ->config ->buildUrl ($ imageSrc );
113
- $ element ->setAttribute ('src ' , $ ciSrc );
114
- }
115
- } else {
116
- if (stripos ($ imageSrc , $ this ->config ->getToken ()) === false ) {
117
- $ ciSrc = $ this ->config ->buildUrl ($ imageSrc );
118
- $ element ->setAttribute ('src ' , $ ciSrc );
119
- }
110
+ if (stripos ($ imageSrc , $ this ->config ->getToken ()) === false ) {
111
+ $ ciSrc = $ this ->config ->buildUrl ($ imageSrc );
112
+ $ element ->setAttribute ('src ' , $ ciSrc );
120
113
}
121
114
} else {
122
115
if ($ element ->hasAttribute ('data-lazy-off ' )
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class ResponsiveBlock
24
24
/**
25
25
* @var Images
26
26
*/
27
- private $ helper ;
27
+ private $ images ;
28
28
29
29
public function __construct (
30
30
Config $ config ,
You can’t perform that action at this time.
0 commit comments