File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ const Layouts = {
44 1 : 'WideScreen' ,
55 2 : 'Cinema'
66}
7+ const resizeImage = ( image , options ) => {
8+ return buildfire . imageLib . resizeImage (
9+ image , options ) ;
10+ }
711
812const defaultData = {
913 content : {
@@ -77,11 +81,10 @@ function render() {
7781
7882 // Set background image if needed
7983 if ( design && design . backgroundImage ) {
84+
8085 const width = Math . ceil ( state . width ) ;
8186 const height = Math . ceil ( state . height ) ;
82-
83- const baseUrl = 'https://czi3m2qn.cloudimg.io/cdn/n/n' ;
84- const url = `${ baseUrl } /${ design . backgroundImage } ?h=${ height } &w=${ width } ` ;
87+ const url = resizeImage ( design . backgroundImage , { width, height } ) ;
8588
8689 window . document . body . setAttribute ( 'style' , `
8790 background-size: cover !important;
You can’t perform that action at this time.
0 commit comments