diff --git a/.env b/.env index 273646442..9c9dfe5a7 100644 --- a/.env +++ b/.env @@ -22,3 +22,4 @@ USER_INFO_COOKIE_NAME='' SUPPORT_URL='' LEARNER_FEEDBACK_URL='' STAFF_FEEDBACK_URL='' +ENABLE_PROFILE_IMAGE='' diff --git a/.env.development b/.env.development index ae4b3cee5..f6fe6b42b 100644 --- a/.env.development +++ b/.env.development @@ -23,3 +23,4 @@ USER_INFO_COOKIE_NAME='edx-user-info' SUPPORT_URL='https://support.edx.org' LEARNER_FEEDBACK_URL='' STAFF_FEEDBACK_URL='' +ENABLE_PROFILE_IMAGE='true' diff --git a/.env.test b/.env.test index 84bc122cd..a1147f2b5 100644 --- a/.env.test +++ b/.env.test @@ -21,3 +21,4 @@ USER_INFO_COOKIE_NAME='edx-user-info' SUPPORT_URL='https://support.edx.org' LEARNER_FEEDBACK_URL='' STAFF_FEEDBACK_URL='' +ENABLE_PROFILE_IMAGE='' diff --git a/src/discussions/post-comments/comments/comment/CommentHeader.jsx b/src/discussions/post-comments/comments/comment/CommentHeader.jsx index fd9bc4da3..0337c2441 100644 --- a/src/discussions/post-comments/comments/comment/CommentHeader.jsx +++ b/src/discussions/post-comments/comments/comment/CommentHeader.jsx @@ -7,6 +7,7 @@ import classNames from 'classnames'; import { AvatarOutlineAndLabelColors } from '../../../../data/constants'; import { AuthorLabel } from '../../../common'; import { useAlertBannerVisible } from '../../../data/hooks'; +import {getConfig} from "@edx/frontend-platform"; const CommentHeader = ({ author, @@ -25,7 +26,7 @@ const CommentHeader = ({ closed, }); - const profileImage = postUsers && Object.values(postUsers)[0].profile.image; + const profileImage = getConfig().ENABLE_PROFILE_IMAGE === 'true' && postUsers && Object.values(postUsers)[0].profile.image; return (