@@ -31,7 +31,10 @@ public function __construct()
3131
3232 public function withDefaultImage (DefaultImage $ defaultImage )
3333 {
34- $ this ->defaultImage = trim ((string )$ defaultImage );
34+ $ defaultImageStr = trim ((string )$ defaultImage );
35+ if (!empty ($ defaultImageStr )) {
36+ $ this ->defaultImage = $ defaultImageStr ;
37+ }
3538 return $ this ;
3639 }
3740
@@ -97,12 +100,12 @@ public function build()
97100 'fetch_format ' => (string )$ this ->fetchFormat ,
98101 'quality ' => (string )$ this ->quality ?: null ,
99102 'crop ' => (string )$ this ->crop ,
100- 'gravity ' => (string )$ this ->gravity ?: null ,
103+ 'gravity ' => (string )$ this ->gravity ?: '' ,
101104 'width ' => $ this ->dimensions ? $ this ->dimensions ->getWidth () : null ,
102105 'height ' => $ this ->dimensions ? $ this ->dimensions ->getHeight () : null ,
103106 'dpr ' => (string )$ this ->dpr ,
104107 'flags ' => $ this ->flags ,
105- 'default_image ' => $ this ->defaultImage ,
108+ 'default_image ' => $ this ->defaultImage ?? '' ,
106109 ]
107110 ];
108111 }
0 commit comments