refactor: change album cover size from 600x600 to 300x300 for better performance

This commit is contained in:
2026-01-25 02:54:17 +00:00
committed by GitHub
parent b59deee486
commit ed41ad6671
2 changed files with 7 additions and 7 deletions

View File

@@ -1 +1 @@
NEXT_PUBLIC_COMMIT_SHA=f1957c7 NEXT_PUBLIC_COMMIT_SHA=b59deee

View File

@@ -137,13 +137,13 @@ export default function AlbumPage() {
// Dynamic cover art URLs based on image size // Dynamic cover art URLs based on image size
const getMobileCoverArtUrl = () => { const getMobileCoverArtUrl = () => {
return album.coverArt && api return album.coverArt && api
? api.getCoverArtUrl(album.coverArt, 600) ? api.getCoverArtUrl(album.coverArt, 300)
: '/default-user.jpg'; : '/default-user.jpg';
}; };
const getDesktopCoverArtUrl = () => { const getDesktopCoverArtUrl = () => {
return album.coverArt && api return album.coverArt && api
? api.getCoverArtUrl(album.coverArt, 600) ? api.getCoverArtUrl(album.coverArt, 300)
: '/default-user.jpg'; : '/default-user.jpg';
}; };
@@ -159,8 +159,8 @@ export default function AlbumPage() {
<Image <Image
src={getMobileCoverArtUrl()} src={getMobileCoverArtUrl()}
alt={album.name} alt={album.name}
width={600} width={300}
height={600} height={300}
className="rounded-md shadow-lg" className="rounded-md shadow-lg"
/> />
</div> </div>
@@ -203,8 +203,8 @@ export default function AlbumPage() {
<Image <Image
src={getDesktopCoverArtUrl()} src={getDesktopCoverArtUrl()}
alt={album.name} alt={album.name}
width={600} width={300}
height={600} height={300}
className="rounded-md" className="rounded-md"
/> />
<div className="space-y-2"> <div className="space-y-2">