@@ -21,6 +21,7 @@ import { useUser, Permission } from '../../hooks/useUser';
2121import useSettings from '../../hooks/useSettings' ;
2222import Link from 'next/link' ;
2323import { uniq } from 'lodash' ;
24+ import CachedImage from '../Common/CachedImage' ;
2425
2526const messages = defineMessages ( {
2627 overviewunavailable : 'Overview unavailable.' ,
@@ -203,9 +204,26 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
203204 className = "media-page"
204205 style = { {
205206 height : 493 ,
206- backgroundImage : `linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%), url(//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${ data . backdropPath } )` ,
207207 } }
208208 >
209+ { data . backdropPath && (
210+ < div className = "media-page-bg-image" >
211+ < CachedImage
212+ alt = ""
213+ src = { `https://image.tmdb.org/t/p/w1920_and_h800_multi_faces/${ data . backdropPath } ` }
214+ layout = "fill"
215+ objectFit = "cover"
216+ priority
217+ />
218+ < div
219+ className = "absolute inset-0"
220+ style = { {
221+ backgroundImage :
222+ 'linear-gradient(180deg, rgba(17, 24, 39, 0.47) 0%, rgba(17, 24, 39, 1) 100%)' ,
223+ } }
224+ />
225+ </ div >
226+ ) }
209227 < PageTitle title = { data . name } />
210228 < Transition
211229 enter = "opacity-0 transition duration-300"
@@ -268,11 +286,20 @@ const CollectionDetails: React.FC<CollectionDetailsProps> = ({
268286 </ Modal >
269287 </ Transition >
270288 < div className = "media-header" >
271- < img
272- src = { `//image.tmdb.org/t/p/w600_and_h900_bestv2${ data . posterPath } ` }
273- alt = ""
274- className = "media-poster"
275- />
289+ < div className = "media-poster" >
290+ < CachedImage
291+ src = {
292+ data . posterPath
293+ ? `https://image.tmdb.org/t/p/w600_and_h900_bestv2${ data . posterPath } `
294+ : '/images/overseerr_poster_not_found.png'
295+ }
296+ alt = ""
297+ layout = "responsive"
298+ width = { 600 }
299+ height = { 900 }
300+ priority
301+ />
302+ </ div >
276303 < div className = "media-title" >
277304 < div className = "media-status" >
278305 < StatusBadge
0 commit comments