diff --git a/src/common/layout/LayoutBadgeImageView.tsx b/src/common/layout/LayoutBadgeImageView.tsx index 3445abc4..ed4af8da 100644 --- a/src/common/layout/LayoutBadgeImageView.tsx +++ b/src/common/layout/LayoutBadgeImageView.tsx @@ -37,7 +37,7 @@ export const LayoutBadgeImageView: FC = props => if(imageElement) { - newStyle.backgroundImage = `url('${ imageElement.src }')`; + newStyle.backgroundImage = (isGroup || isGrayscale) ? imageElement.src : `url(${ GetConfiguration('badge.asset.url').replace('%badgename%', badgeCode.toString()) })`; newStyle.width = imageElement.width; newStyle.height = imageElement.height; @@ -46,7 +46,7 @@ export const LayoutBadgeImageView: FC = props => newStyle.transform = `scale(${ scale })`; if(!(scale % 1)) newStyle.imageRendering = 'pixelated'; - + newStyle.width = (imageElement.width * scale); newStyle.height = (imageElement.height * scale); } @@ -72,7 +72,7 @@ export const LayoutBadgeImageView: FC = props => element.onload = () => setImageElement(element); didSetBadge = true; - + GetSessionDataManager().events.removeEventListener(BadgeImageReadyEvent.IMAGE_READY, onBadgeImageReadyEvent); }