We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 95909db + b7f409f commit 86e0f82Copy full SHA for 86e0f82
1 file changed
src/widget/widget.js
@@ -4,6 +4,10 @@ const Layouts = {
4
1: 'WideScreen',
5
2: 'Cinema'
6
}
7
+const resizeImage = (image,options) =>{
8
+ return buildfire.imageLib.resizeImage(
9
+ image, options);
10
+}
11
12
const defaultData = {
13
content: {
@@ -77,11 +81,10 @@ function render() {
77
81
78
82
// Set background image if needed
79
83
if (design && design.backgroundImage) {
84
+
80
85
const width = Math.ceil(state.width);
86
const height = Math.ceil(state.height);
-
- const baseUrl = 'https://czi3m2qn.cloudimg.io/cdn/n/n';
- const url = `${baseUrl}/${design.backgroundImage}?h=${height}&w=${width}`;
87
+ const url = resizeImage(design.backgroundImage, { width, height });
88
89
window.document.body.setAttribute('style', `
90
background-size: cover !important;
0 commit comments