diff --git a/config.js b/config.js index 36b982ff6..cd68045b2 100644 --- a/config.js +++ b/config.js @@ -63,6 +63,7 @@ const config = { ENABLE_MATURE: process.env.ENABLE_MATURE === 'true', CUSTOM_HOMEPAGE: process.env.CUSTOM_HOMEPAGE === 'true', SHOW_TAGS_INTRO: process.env.SHOW_TAGS_INTRO === 'true', + AVATAR_DEFAULT: process.env.AVATAR_DEFAULT, }; config.URL_LOCAL = `http://localhost:${config.WEB_SERVER_PORT}`; diff --git a/ui/component/channelThumbnail/view.jsx b/ui/component/channelThumbnail/view.jsx index 19c15fc2e..b09846840 100644 --- a/ui/component/channelThumbnail/view.jsx +++ b/ui/component/channelThumbnail/view.jsx @@ -6,6 +6,7 @@ import Gerbil from './gerbil.png'; import FreezeframeWrapper from 'component/fileThumbnail/FreezeframeWrapper'; import ChannelStakedIndicator from 'component/channelStakedIndicator'; import OptimizedImage from 'component/optimizedImage'; +import { AVATAR_DEFAULT } from 'config'; type Props = { thumbnail: ?string, @@ -48,6 +49,7 @@ function ChannelThumbnail(props: Props) { const channelThumbnail = thumbnail || thumbnailPreview; const isGif = channelThumbnail && channelThumbnail.endsWith('gif'); const showThumb = (!obscure && !!thumbnail) || thumbnailPreview; + const defaultAvater = AVATAR_DEFAULT || Gerbil; // Generate a random color class based on the first letter of the channel name const { channelName } = parseURI(uri); @@ -86,7 +88,7 @@ function ChannelThumbnail(props: Props) { setThumbError(true)} // if thumb fails (including due to https replace, show gerbil. /> @@ -99,7 +101,7 @@ function ChannelThumbnail(props: Props) { setThumbError(true)} // if thumb fails (including due to https replace, show gerbil. />