diff --git a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCard.js b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCard.js index c78e4d9f..d9b5bb27 100644 --- a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCard.js +++ b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCard.js @@ -55,7 +55,17 @@ const CardText = styled.p` class MediaLibraryCard extends React.Component { render() { - const { isSelected, displayURL, text, onClick, width, margin, isPrivate, type } = this.props; + const { + isSelected, + displayURL, + text, + onClick, + width, + margin, + isPrivate, + type, + isViewableImage, + } = this.props; const url = displayURL.get('url'); return ( - {url ? : {type}} + {url && isViewableImage ? : {type}} {text} diff --git a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js index a2c3128e..404e9207 100644 --- a/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js +++ b/packages/netlify-cms-core/src/components/MediaLibrary/MediaLibraryCardGrid.js @@ -52,6 +52,7 @@ const MediaLibraryCardGrid = ({ displayURL={displayURLs.get(file.id, file.url ? Map({ url: file.url }) : Map())} loadDisplayURL={() => loadDisplayURL(file)} type={file.type} + isViewableImage={file.isViewableImage} /> ))} {!canLoadMore ? null : }