Revert "use cdn for channel thumbnails"
This reverts commit b231b1a51f
.
## Issue
5564: Don't use optimized URLs on channel pages (profile/banner)
This commit is contained in:
parent
3d6304bc25
commit
e7adc607fa
1 changed files with 2 additions and 11 deletions
|
@ -5,7 +5,6 @@ import classnames from 'classnames';
|
||||||
import Gerbil from './gerbil.png';
|
import Gerbil from './gerbil.png';
|
||||||
import FreezeframeWrapper from 'component/fileThumbnail/FreezeframeWrapper';
|
import FreezeframeWrapper from 'component/fileThumbnail/FreezeframeWrapper';
|
||||||
import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
import ChannelStakedIndicator from 'component/channelStakedIndicator';
|
||||||
import { getThumbnailCdnUrl } from 'util/thumbnail';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
thumbnail: ?string,
|
thumbnail: ?string,
|
||||||
|
@ -68,14 +67,6 @@ function ChannelThumbnail(props: Props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = channelThumbnail;
|
|
||||||
// @if TARGET='web'
|
|
||||||
// Pass image urls through a compression proxy
|
|
||||||
if (thumbnail) {
|
|
||||||
url = getThumbnailCdnUrl({ thumbnail });
|
|
||||||
}
|
|
||||||
// @endif
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classnames('channel-thumbnail', className, {
|
className={classnames('channel-thumbnail', className, {
|
||||||
|
@ -88,7 +79,7 @@ function ChannelThumbnail(props: Props) {
|
||||||
<img
|
<img
|
||||||
alt={__('Channel profile picture')}
|
alt={__('Channel profile picture')}
|
||||||
className="channel-thumbnail__default"
|
className="channel-thumbnail__default"
|
||||||
src={!thumbError && url ? url : Gerbil}
|
src={!thumbError && thumbnailPreview ? thumbnailPreview : Gerbil}
|
||||||
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -100,7 +91,7 @@ function ChannelThumbnail(props: Props) {
|
||||||
<img
|
<img
|
||||||
alt={__('Channel profile picture')}
|
alt={__('Channel profile picture')}
|
||||||
className="channel-thumbnail__custom"
|
className="channel-thumbnail__custom"
|
||||||
src={!thumbError && url ? url : Gerbil}
|
src={!thumbError ? thumbnailPreview || thumbnail : Gerbil}
|
||||||
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue