refactor: remove images.weserv.nl preconnect and image optimization utility

This commit is contained in:
kuekhaoyang
2025-11-24 17:25:05 +08:00
parent f4830652bf
commit 41edd7ce26
3 changed files with 2 additions and 7 deletions
-3
View File
@@ -28,9 +28,6 @@ export default function RootLayout({
}>) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<link rel="preconnect" href="https://images.weserv.nl" />
</head>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
suppressHydrationWarning
+1 -2
View File
@@ -8,7 +8,6 @@ import Image from 'next/image';
import Link from 'next/link';
import { Card } from '@/components/ui/Card';
import { Icons } from '@/components/ui/Icon';
import { getOptimizedImageUrl } from '@/lib/utils/image-utils';
interface DoubanMovie {
id: string;
@@ -41,7 +40,7 @@ export const MovieCard = memo(function MovieCard({ movie, onMovieClick, priority
<Card hover className="overflow-hidden p-0 h-full" blur={false}>
<div className="relative aspect-[2/3] overflow-hidden bg-[var(--glass-bg)] rounded-[var(--radius-2xl)]">
<Image
src={getOptimizedImageUrl(movie.cover, 400)}
src={movie.cover}
alt={movie.title}
fill
className="object-cover transition-transform duration-300 group-hover:scale-105 rounded-[var(--radius-2xl)]"
+1 -2
View File
@@ -7,7 +7,6 @@ import { Card } from '@/components/ui/Card';
import { Badge } from '@/components/ui/Badge';
import { Icons } from '@/components/ui/Icon';
import { LatencyBadge } from '@/components/ui/LatencyBadge';
import { getOptimizedImageUrl } from '@/lib/utils/image-utils';
import { Video } from '@/lib/types';
@@ -57,7 +56,7 @@ export const VideoCard = memo<VideoCardProps>(({
<div className="relative aspect-[2/3] bg-[color-mix(in_srgb,var(--glass-bg)_50%,transparent)] overflow-hidden rounded-[var(--radius-2xl)]">
{video.vod_pic ? (
<Image
src={getOptimizedImageUrl(video.vod_pic, 400)}
src={video.vod_pic}
alt={video.vod_name}
fill
className="object-cover rounded-[var(--radius-2xl)]"