Skip to content

Commit baa4dc6

Browse files
benthecoderclaude
andcommitted
optimize images and fix vercel function size limit
- compress 68 images, saving 239MB total - resize images wider than 2000px to reduce file size - configure next.js outputFileTracingExcludes to prevent public directory from being bundled into serverless functions - add exclusions for all routes including tags, posts, and api routes this fixes the "max serverless function size of 250 MB exceeded" error on vercel by ensuring static assets are served via cdn instead of being packaged into function bundles. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ac7c6c0 commit baa4dc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4
-0
lines changed

next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ const nextConfig = {
55
//serverExternalPackages: ['sharp', 'onnxruntime-node'],
66
},
77
outputFileTracingExcludes: {
8+
"*": ["public/**/*", ".git/**/*"],
89
"/posts": ["public/**/*"],
910
"/posts/[slug]": ["public/**/*"],
11+
"/tags": ["public/**/*"],
12+
"/tags/[slug]": ["public/**/*"],
13+
"/api/**": ["public/**/*"],
1014
},
1115
rewrites: async () => [
1216
{

public/images/2023.jpeg

-619 KB

public/images/advice.jpeg

-1.54 MB

public/images/ailandscape.jpeg

-2.67 MB

public/images/annunciation.jpg

-1.47 MB

public/images/art.jpg

-12 MB

public/images/astronomer.jpg

-3.53 MB

public/images/athens.jpeg

-916 KB

public/images/aurora_nagoya.jpeg

-1010 KB

public/images/bluesound.jpeg

-10.1 MB

0 commit comments

Comments
 (0)