Skip to content

fix(site): allow for remote images#7769

Merged
mhartington merged 1 commit intomainfrom
search-remote-images
Apr 2, 2026
Merged

fix(site): allow for remote images#7769
mhartington merged 1 commit intomainfrom
search-remote-images

Conversation

@mhartington
Copy link
Copy Markdown
Member

@mhartington mhartington commented Apr 2, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed image URL handling in search results.
  • Chores

    • Updated image source configuration to support additional content delivery networks.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 2, 2026 5:25pm
docs Ready Ready Preview, Comment Apr 2, 2026 5:25pm
eclipse Ready Ready Preview, Comment Apr 2, 2026 5:25pm
site Ready Ready Preview, Comment Apr 2, 2026 5:25pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c4176f76-65ed-47f5-8085-3e36425886a2

📥 Commits

Reviewing files that changed from the base of the PR and between 929684d and 704c7af.

📒 Files selected for processing (2)
  • apps/site/next.config.mjs
  • apps/site/src/components/support/search.tsx

Walkthrough

This change updates the image URL handling system by refactoring the Next.js image configuration to dynamically generate remote patterns from a centralized hostname array, while simplifying image path construction in a search component by removing a URL wrapper function.

Changes

Cohort / File(s) Summary
Configuration Updates
apps/site/next.config.mjs
Introduced imageRemoteHostnames array containing cdn.sanity.io, prisma.io, www.prisma.io, DOCS_ORIGIN_HOST, and BLOG_ORIGIN_HOST. Refactored images.remotePatterns to dynamically generate from this array (mapping each hostname to HTTPS patterns) instead of single hard-coded entry.
Component Updates
apps/site/src/components/support/search.tsx
Removed withSiteBasePathForImageSrc() wrapper function call from SearchResultItem image src prop, now using post.heroImagePath directly for image URL construction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: enabling remote images by configuring remote hostnames and updating image source handling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 2, 2026, 5:33 PM

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