We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 630a77e commit 3344da0Copy full SHA for 3344da0
helpers/lib/cdnify.js
@@ -56,8 +56,8 @@ module.exports = globals => {
56
}
57
58
if (protocol === 'webdav:') {
59
- const imgRegex = /.(jpg|jpeg|gif|png)$/i;
60
- const isImage = imgRegex.test(path);
+ const supportedImageExtensions = ['jpg', 'jpeg', 'gif', 'png'];
+ const isImage = supportedImageExtensions.some(ext => path.toLowerCase().includes(ext));
61
const prefix = isImage ? 'images/stencil/original/content' : 'content'
62
return [cdnUrl, prefix, path].join('/');
63
0 commit comments