Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions apps/site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ const BLOG_ORIGIN_HOST = (() => {
}
})();

const imageRemoteHostnames = [
"cdn.sanity.io",
"prisma.io",
"www.prisma.io",
DOCS_ORIGIN_HOST,
BLOG_ORIGIN_HOST,
];

if (
process.env.NODE_ENV === "production" &&
(!process.env.NEXT_DOCS_ORIGIN || !process.env.NEXT_BLOG_ORIGIN)
Expand Down Expand Up @@ -246,12 +254,10 @@ const config = {
reactStrictMode: true,
images: {
unoptimized: false,
remotePatterns: [
{
protocol: "https",
hostname: "cdn.sanity.io",
},
],
remotePatterns: imageRemoteHostnames.map((hostname) => ({
protocol: "https",
hostname,
})),
},
transpilePackages: ["@prisma/eclipse"],
async redirects() {
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/components/support/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function SearchResultItem({ item, onClick }: SearchResultItemProps): ReactNode {
<div className="relative aspect-video w-full overflow-hidden rounded-square bg-background-neutral">
{post.heroImagePath ? (
<Image
src={withSiteBasePathForImageSrc(post.heroImagePath)}
src={post.heroImagePath}
alt={post.content}
fill
sizes="(min-width: 640px) 160px, 128px"
Expand Down
Loading