Skip to content

fix(blog): restore unoptimized prop on blog cover images#3782

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/images-landing
Mar 26, 2026
Merged

fix(blog): restore unoptimized prop on blog cover images#3782
waleedlatif1 merged 1 commit intostagingfrom
fix/images-landing

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 26, 2026 8:09am

Request Review

@cursor
Copy link

cursor bot commented Mar 26, 2026

PR Summary

Low Risk
Small, localized rendering change that only affects how blog images are served (optimizer bypass) with no data, auth, or business-logic impact.

Overview
Restores the unoptimized prop on next/image usages across the blog (post page hero image, related post cards, author post cards, and the shared PostGrid) so blog cover/OG images bypass Next’s image optimizer.

This prevents /_next/image requests for these assets, addressing the recently introduced 400 errors on blog listing, author pages, and individual post pages.

Written by Cursor Bugbot for commit 2978d47. Configure here.

@waleedlatif1 waleedlatif1 merged commit c5fe925 into staging Mar 26, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/images-landing branch March 26, 2026 08:13
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR is a targeted bug fix that restores the unoptimized prop to all blog cover/thumbnail Image components that were accidentally dropped in #3716. Without this prop, Next.js Image Optimization tries to process the OG images through /_next/image, which fails with 400 errors when the image host is not listed in next.config remotePatterns. The fix is applied consistently across all three affected entry-points:\n\n- blog/[slug]/page.tsx – hero image and related-post thumbnails\n- blog/authors/[id]/page.tsx – post cover cards in the author listing\n- blog/post-grid.tsx – post thumbnails in the main grid\n\nNo logic changes, no new warnings, and all touched images already follow the same unoptimized pattern used elsewhere in the blog (e.g. the author avatar image that was not affected by #3716).

Confidence Score: 5/5

Safe to merge — single-prop restoration with no logic changes and no side effects.

The PR adds exactly one boolean prop back to four Image components that lost it in a previous refactor. The change is fully consistent with every other Image usage in the blog, the root cause is clearly explained, and the fix directly maps to the reported 400 errors. No new dependencies, no state changes, no risk of regression.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/blog/[slug]/page.tsx Restores unoptimized to both the hero cover image and the related-posts thumbnails; correct and complete.
apps/sim/app/(landing)/blog/authors/[id]/page.tsx Restores unoptimized to the post cover image in the author listing grid; avatar image already had unoptimized, so coverage is now complete.
apps/sim/app/(landing)/blog/post-grid.tsx Restores unoptimized to the post thumbnail Image in the main blog grid; single clean change, no side effects.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Browser requests blog page"] --> B{"Image has\nunoptimized prop?"}
    B -- "Yes (after fix)" --> C["Image served directly\nfrom source URL"]
    B -- "No (before fix)" --> D["Next.js /_next/image\nprocessing pipeline"]
    D --> E["400 Error — host not\nin remotePatterns"]
    C --> F["Image loads correctly ✓"]
Loading

Reviews (1): Last reviewed commit: "fix(blog): restore unoptimized prop on b..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant