Skip to content

Commit

Permalink
feat: Allow http urls for resizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Howard committed Jun 16, 2021
1 parent e872de9 commit 34b2061
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blocks/resizer-image-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ const getResizerParam = (
thumborParam = thumborParam.filter(focalPointFilter(focalPoint));
}
thumborParam = thumborParam.resize(width, height).buildUrl();
const urlSuffix = originalUrl.replace('https://', '');

// supports http and https
const urlSuffix = originalUrl
.replace('https://', '')
.replace('http://', '');

const breakpointName = `${width}x${height}`;
return thumborParam
.replace(resizerURL, '')
Expand Down

0 comments on commit 34b2061

Please sign in to comment.