Self-host hero slider images instead of hotlinking to Unsplash

Production server has no path to fetch images.unsplash.com at
request time, so the slider was rendering without backgrounds
after deploy. Downloaded and cropped the same 3 photos locally
into public/images/ (landscape, ~1920px, ~450-730KB each) and
point the slider at them; dropped the now-unused Unsplash
remotePattern from next.config.ts.
This commit is contained in:
2026-08-10 16:07:23 +03:30
parent 3f479af8be
commit d486b2dd65
5 changed files with 3 additions and 10 deletions
-4
View File
@@ -3,10 +3,6 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "images.unsplash.com",
},
{
protocol: "https",
hostname: "c804387.parspack.net",
Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

+3 -6
View File
@@ -14,23 +14,20 @@ type Slide = {
const slides: Slide[] = [
{
image:
"https://images.unsplash.com/photo-1583364428520-fa6c5013c0c3?fm=jpg&q=80&w=2400&auto=format&fit=crop",
image: "/images/hero-slider-1.jpg",
eyebrow: "بیش از ۲۳ سال تجربه",
title: "کیفیتی که به آن اعتماد دارید",
subtitle: "بیش از ۲۳۰ مشتری در سراسر کشور، انتخاب اول خود را کرده‌اند",
},
{
image:
"https://images.unsplash.com/photo-1589348792383-8ebcbec4ef88?fm=jpg&q=80&w=2400&auto=format&fit=crop",
image: "/images/hero-slider-2.jpg",
eyebrow: "دام سالم، تولید پایدار",
title: "همراه شما در تمام دوره‌های پرورش",
subtitle:
"از دوره پروار تا شیردهی؛ مکمل‌هایی متناسب با نیاز واقعی گله شما",
},
{
image:
"https://images.unsplash.com/photo-1723357018190-c0163698165b?fm=jpg&q=80&w=2400&auto=format&fit=crop",
image: "/images/hero-slider-3.jpg",
eyebrow: "طیور پرقدرت",
title: "افزایش بازده با تغذیه اصولی",
subtitle: