diff --git a/frontends/mit-open/public/images/default_resource.jpg b/frontends/mit-open/public/images/default_resource.jpg new file mode 100644 index 0000000000..df60847089 Binary files /dev/null and b/frontends/mit-open/public/images/default_resource.jpg differ diff --git a/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.tsx b/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.tsx index c529f5d7e8..238ab875ea 100644 --- a/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.tsx +++ b/frontends/ol-components/src/components/LearningResourceExpanded/LearningResourceExpanded.tsx @@ -10,6 +10,7 @@ import { formatDate, resourceThumbnailSrc, getReadableResourceType, + DEFAULT_RESOURCE_IMG, } from "ol-utilities" import type { EmbedlyConfig } from "ol-utilities" import { theme } from "../ThemeProvider/ThemeProvider" @@ -80,6 +81,7 @@ const Image = styled.img<{ aspect: number }>` aspect-ratio: ${({ aspect }) => aspect}; border-radius: 8px; width: 100%; + object-fit: cover; ` const SkeletonImage = styled(Skeleton)<{ aspect: number }>` @@ -169,6 +171,10 @@ const ImageSection: React.FC<{ alt={resource?.image.alt ?? ""} /> ) + } else if (resource) { + return ( + + ) } else { return (