ChannelThumbnail: fix quality typo + consolidate 'small' variant sizes

- Fixed quality typo
- Make all the 'small' variants use the same size for better caching.
This commit is contained in:
infinite-persistence 2022-06-07 14:21:48 +08:00
parent 4e35a2e5dc
commit 1ab140c192
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -119,12 +119,13 @@ function ChannelThumbnail(props: Props) {
'channel-thumbnail--resolving': isResolving,
})}
>
{/* width: use the same size for all 'small' variants so that caching works better */}
<OptimizedImage
alt={__('Channel profile picture')}
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
width={xxsmall ? 16 : small || xsmall ? 64 : 160}
quality={xxsmall ? 16 : small || xsmall ? 85 : 95}
width={xxsmall || xsmall || small ? 64 : 160}
quality={95}
loading={noLazyLoad ? undefined : 'lazy'}
onError={() => {
if (setThumbUploadError) {