Skip to content

Commit d45e559

Browse files
committed
fix: update JPG check to account for JPGs that have query strings
1 parent 35a9c8f commit d45e559

File tree

1 file changed

+6
-1
lines changed
  • packages/components/bolt-image/src

1 file changed

+6
-1
lines changed

packages/components/bolt-image/src/image.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,12 @@ class BoltImage extends withLitHtml() {
184184
}
185185
}
186186

187-
const _isJpg = src && src.split('.').pop() === 'jpg';
187+
const _isJpg =
188+
src &&
189+
src
190+
.split('.')
191+
.pop()
192+
.includes('jpg');
188193
const _canUseRatio = ratioW > 0 && ratioH > 0 && useRatio && !cover;
189194
// Only JPGs allowed, PNGs can have transparency and may not look right layered over placeholder
190195
const _canUsePlaceholder = (_canUseRatio || cover) && _isJpg;

0 commit comments

Comments
 (0)