Fix broken images on live site with cache-busting and proper headers

Cloudflare was caching 404 responses from before the tunnel was configured.
Added query params to bust stale cached 404s for featured.jpg and goddess.webp.
Added Cache-Control headers for /images/* to ensure proper long-term caching.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-03 12:23:42 +00:00
parent 05aa076eb5
commit 96172427fc
2 changed files with 26 additions and 2 deletions

View File

@ -2,6 +2,30 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
images: {
localPatterns: [
{
pathname: "/images/**",
search: "?v=*",
},
{
pathname: "/images/**",
},
],
},
async headers() {
return [
{
source: "/images/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
];
},
};
export default nextConfig;

View File

@ -123,7 +123,7 @@ function RitualArtSection() {
{/* Featured Art Image */}
<div className="relative aspect-[3/4] rounded-2xl overflow-hidden shadow-xl">
<Image
src="/images/art/featured.jpg"
src="/images/art/featured.jpg?v=2"
alt="Visionary Art by Ximena Xaguar"
fill
className="object-cover"
@ -162,7 +162,7 @@ function RitualArtSection() {
// Art Gallery Section
function GallerySection() {
const artworks = [
{ src: '/images/art/goddess.webp', title: 'Goddess' },
{ src: '/images/art/goddess.webp?v=2', title: 'Goddess' },
{ src: '/images/art/mujer-medicina.webp', title: 'Mujer Medicina' },
{ src: '/images/art/shiva-main.webp', title: 'Shiva' },
{ src: '/images/art/twin-flames.webp', title: 'Twin Flames' },