Skip to content

Commit 110a62e

Browse files
MaxGhenisclaude
andauthored
Add CI check for oversized blog cover images (#2786)
* Optimize cover image for multi-agent workflows blog post Resize from 6016x4000 (33MB) to 1200x800 (1.7MB) to fix deployment issue. Original 33MB file was 10x larger than other cover images and likely causing webpack compilation or deployment problems. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add CI check for oversized blog cover images Add image size validation to blog post validation script: - Fail CI if cover images exceed 5MB - Provide optimization command in error message - Optimize existing oversized images: - american-worker-rebate-act.jpg: 11.3MB → 501KB - uk_budget_box_hunt.jpg: 10.2MB → 597KB - vance-ctc.jpg: 8.5MB → 437KB - Shorten multi-agent post description to 140 chars (was 170) Prevents deployment issues from oversized images like the 33MB file that broke the multi-agent workflows blog post. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Format validation script with prettier * Use full path in image optimization command --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f2d809 commit 110a62e

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

scripts/validate-blog-posts.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ function validate() {
8181
if (stat.size === 0) {
8282
errors.push(`${postNum}: Cover image ${post.image} is empty (0 bytes)`);
8383
}
84+
85+
// Check image size (cover images should be < 5MB)
86+
const MAX_COVER_IMAGE_SIZE = 5 * 1024 * 1024; // 5MB
87+
if (stat.size > MAX_COVER_IMAGE_SIZE) {
88+
const sizeMB = (stat.size / (1024 * 1024)).toFixed(1);
89+
errors.push(
90+
`${postNum}: Cover image ${post.image} is ${sizeMB}MB (max 5MB). ` +
91+
`Optimize with: convert ${coverImagePath} -resize 1200x800 ${coverImagePath}`,
92+
);
93+
}
8494
}
8595

8696
// Check markdown file exists (unless it's an external_url post)
-10.8 MB
Loading
-9.61 MB
Loading

src/images/posts/vance-ctc.jpg

-8.05 MB
Loading

src/posts/posts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@
14981498
},
14991499
{
15001500
"title": "Testing multi-agent AI workflows for policy research",
1501-
"description": "A multi-agent Claude Code system we built fared better on distributional analysis than benefit interactions; we're using these insights to enhance our forthcoming plugin.",
1501+
"description": "A multi-agent Claude Code system fared better on distributional analysis than benefit interactions; insights inform our forthcoming plugin.",
15021502
"date": "2025-10-28",
15031503
"tags": ["uk", "featured", "technology", "ai"],
15041504
"authors": ["vahid-ahmadi"],

0 commit comments

Comments
 (0)