diff --git a/app/[locale]/blog/[slug]/page.tsx b/app/[locale]/blog/[slug]/page.tsx index cdee0661..d3efcb21 100644 --- a/app/[locale]/blog/[slug]/page.tsx +++ b/app/[locale]/blog/[slug]/page.tsx @@ -80,7 +80,7 @@ export default async function BlogPost({ params }: BlogPostProps) {
{post.frontmatter.title} {featuredPost.frontmatter.title} {post.frontmatter.title} new Date() || post.frontmatter.public === false) && ( - - Preview - - )} + + Preview + + )}
)}
diff --git a/chunk-analysis.json b/chunk-analysis.json new file mode 100644 index 00000000..e9acd4c4 --- /dev/null +++ b/chunk-analysis.json @@ -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 diff --git a/lib/imgproxy-loader.ts b/lib/imgproxy-loader.ts index 041f58e4..0b23fd81 100644 --- a/lib/imgproxy-loader.ts +++ b/lib/imgproxy-loader.ts @@ -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) }); } diff --git a/tmp-lcp.json b/tmp-lcp.json new file mode 100644 index 00000000..06ae6533 --- /dev/null +++ b/tmp-lcp.json @@ -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": "\"Startseite\"", + "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 +} \ No newline at end of file