Skip to content

Commit

Permalink
Fix images URLs with https
Browse files Browse the repository at this point in the history
Storyblok's image assets add "https://" to URLs, and there's no way to disable that (like it is possible with "Image (old)" field type), as result - such images aren't displayed. This line fixes that, possibly there is a more elegant solution.
  • Loading branch information
daniel-bejamas authored Aug 30, 2020
1 parent 4c31ad1 commit b2fcaa1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/getBasicImageProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function getBasicImageProps(image) {
lqip = image.base64 ? image.base64 : null
}

url = url.replace('https:', '')
url = validImageUrlPattern.test(url) ? url : null

if (!url) {
Expand Down

0 comments on commit b2fcaa1

Please sign in to comment.