Compare commits

...

1 Commits

Author SHA1 Message Date
55a084e762 fix(blog): revert face detection imgproxy gravity causing 500 errors on standard open source image
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m35s
Build & Deploy / 🏗️ Build (push) Successful in 4m22s
Build & Deploy / 🚀 Deploy (push) Successful in 26s
Build & Deploy / 🧪 Smoke Test (push) Successful in 55s
Build & Deploy / ⚡ Lighthouse (push) Successful in 7m18s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-02-21 14:09:35 +01:00
5 changed files with 140 additions and 29 deletions

View File

@@ -80,7 +80,7 @@ export default async function BlogPost({ params }: BlogPostProps) {
<div className="relative w-full h-[70vh] min-h-[500px] overflow-hidden group">
<div className="absolute inset-0 transition-transform duration-[3s] ease-out scale-110 group-hover:scale-100">
<Image
src={`${post.frontmatter.featuredImage}?gravity=obj:face`}
src={post.frontmatter.featuredImage}
alt={post.frontmatter.title}
fill
priority

View File

@@ -62,7 +62,7 @@ export default async function BlogIndex({ params }: BlogIndexProps) {
{featuredPost && featuredPost.frontmatter.featuredImage && (
<>
<Image
src={`${featuredPost.frontmatter.featuredImage}?gravity=obj:face`}
src={featuredPost.frontmatter.featuredImage}
alt={featuredPost.frontmatter.title}
fill
className="absolute inset-0 w-full h-full object-cover scale-105 animate-slow-zoom opacity-40 md:opacity-60"
@@ -160,7 +160,7 @@ export default async function BlogIndex({ params }: BlogIndexProps) {
{post.frontmatter.featuredImage && (
<div className="relative h-48 md:h-72 overflow-hidden">
<Image
src={`${post.frontmatter.featuredImage}?gravity=obj:face`}
src={post.frontmatter.featuredImage}
alt={post.frontmatter.title}
fill
className="w-full h-full object-cover transition-transform duration-1000 group-hover:scale-110"
@@ -177,13 +177,13 @@ export default async function BlogIndex({ params }: BlogIndexProps) {
)}
{(new Date(post.frontmatter.date) > new Date() ||
post.frontmatter.public === false) && (
<Badge
variant="accent"
className="absolute top-3 right-3 md:top-6 md:right-6 shadow-lg bg-orange-500 text-white border-none"
>
Preview
</Badge>
)}
<Badge
variant="accent"
className="absolute top-3 right-3 md:top-6 md:right-6 shadow-lg bg-orange-500 text-white border-none"
>
Preview
</Badge>
)}
</div>
)}
<div className="p-5 md:p-10 flex flex-col flex-1">

39
chunk-analysis.json Normal file
View File

@@ -0,0 +1,39 @@
.next/static/chunks/1555f2949dbcddff.js
.next/static/chunks/180f5dcf81481335.js
.next/static/chunks/268553c5293137f5.js
.next/static/chunks/2d7ae32de68a39ef.js
.next/static/chunks/2ec0936da0321266.js
.next/static/chunks/37f7b54a37295c30.js
.next/static/chunks/3e3942369abf2ddc.js
.next/static/chunks/424d0a83ac1f43b8.js
.next/static/chunks/47f749213f3cceab.js
.next/static/chunks/487d683c339d19a3.js
.next/static/chunks/535c1ab943e23448.js
.next/static/chunks/558d909c3c1972b3.js
.next/static/chunks/6cf611207add5a99.js
.next/static/chunks/7bd9cb4fe778d0a3.js
.next/static/chunks/817ca2bc66023675.js
.next/static/chunks/83318e1ba94652b0.js
.next/static/chunks/882400359e57d35e.js
.next/static/chunks/91829f600ae9b629.js
.next/static/chunks/98b8bfc9eb444163.js
.next/static/chunks/9aed5432afcf0f2d.js
.next/static/chunks/a1d67bb574863461.js
.next/static/chunks/a6dad97d9634a72d.js
.next/static/chunks/a71a8075e35ac509.js
.next/static/chunks/afc79511da623949.js
.next/static/chunks/b5c2a6630c37e020.js
.next/static/chunks/bcded4d8b49a0260.js
.next/static/chunks/c2f4c81be736500f.js
.next/static/chunks/c4008b16a5e99b90.js
.next/static/chunks/c98e4e432699368d.js
.next/static/chunks/c9e37d1e4c73c7f0.js
.next/static/chunks/d79d122fe6c2ca13.js
.next/static/chunks/db3ea84e87f72a70.js
.next/static/chunks/e39a48c430164d16.js
.next/static/chunks/e58096c0ead62031.js
.next/static/chunks/ed779de026be3e39.js
.next/static/chunks/f7b46fbdaad1733e.js
.next/static/chunks/fa833b5e3015d34f.js
.next/static/chunks/fc4f94c4cc594aa4.js
.next/static/chunks/turbopack-5e3bd8a685a47b49.js

View File

@@ -23,28 +23,11 @@ export default function imgproxyLoader({
return src;
}
// Check if src contains custom gravity query parameter
let gravity = 'sm'; // Use smart gravity (content-aware) by default
let cleanSrc = src;
try {
// Dummy base needed for relative URLs
const url = new URL(src, 'http://localhost');
const customGravity = url.searchParams.get('gravity');
if (customGravity) {
gravity = customGravity;
url.searchParams.delete('gravity');
cleanSrc = src.startsWith('http') ? url.href : url.pathname + url.search;
}
} catch (e) {
// Fallback if parsing fails
}
// We use the width provided by Next.js for responsive images
// Height is set to 0 to maintain aspect ratio
return getImgproxyUrl(cleanSrc, {
return getImgproxyUrl(src, {
width,
resizing_type: 'fit',
gravity,
gravity: 'sm', // Use smart gravity (content-aware) instead of face detection (requires ML/Pro)
});
}

89
tmp-lcp.json Normal file
View File

@@ -0,0 +1,89 @@
{
"id": "largest-contentful-paint-element",
"title": "Largest Contentful Paint element",
"description": "This is the largest contentful element painted within the viewport. [Learn more about the Largest Contentful Paint element](https://developer.chrome.com/docs/lighthouse/performance/lighthouse-largest-contentful-paint/)",
"score": 0,
"scoreDisplayMode": "metricSavings",
"displayValue": "5,490 ms",
"metricSavings": {
"LCP": 3000
},
"details": {
"type": "list",
"items": [
{
"type": "table",
"headings": [
{
"key": "node",
"valueType": "node",
"label": "Element"
}
],
"items": [
{
"node": {
"type": "node",
"lhId": "page-0-IMG",
"path": "1,HTML,1,BODY,27,DIV,0,DIV,0,DIV,0,DIV,0,DIV,2,HEADER,0,DIV,0,DIV,0,A,0,IMG",
"selector": "div.container > div.flex-shrink-0 > a > img.h-10",
"boundingRect": {
"top": 20,
"bottom": 60,
"left": 32,
"right": 151,
"width": 119,
"height": 40
},
"snippet": "<img alt=\"Startseite\" width=\"120\" height=\"120\" decoding=\"async\" data-nimg=\"1\" class=\"h-10 md:h-14 w-auto transition-all duration-500 group-hover:scale-110\" srcset=\"/logo-white.svg 1x, /logo-white.svg 2x\" src=\"/logo-white.svg\" style=\"color: transparent;\">",
"nodeLabel": "Startseite"
}
}
]
},
{
"type": "table",
"headings": [
{
"key": "phase",
"valueType": "text",
"label": "Phase"
},
{
"key": "percent",
"valueType": "text",
"label": "% of LCP"
},
{
"key": "timing",
"valueType": "ms",
"label": "Timing"
}
],
"items": [
{
"phase": "TTFB",
"timing": 459.198,
"percent": "8%"
},
{
"phase": "Load Delay",
"timing": 58.11240179828974,
"percent": "1%"
},
{
"phase": "Load Time",
"timing": 49.75227841406388,
"percent": "1%"
},
{
"phase": "Render Delay",
"timing": 4920.729319787644,
"percent": "90%"
}
]
}
]
},
"guidanceLevel": 1
}