Skip to content

Commit

Permalink
fix: update JPG check to account for JPGs that have query strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sghoweri committed Oct 24, 2019
1 parent 35a9c8f commit d45e559
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/components/bolt-image/src/image.js
Expand Up @@ -184,7 +184,12 @@ class BoltImage extends withLitHtml() {
}
}

const _isJpg = src && src.split('.').pop() === 'jpg';
const _isJpg =
src &&
src
.split('.')
.pop()
.includes('jpg');
const _canUseRatio = ratioW > 0 && ratioH > 0 && useRatio && !cover;
// Only JPGs allowed, PNGs can have transparency and may not look right layered over placeholder
const _canUsePlaceholder = (_canUseRatio || cover) && _isJpg;
Expand Down

0 comments on commit d45e559

Please sign in to comment.