Skip to content

Commit

Permalink
chore: next image
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwisecodes committed Nov 28, 2024
1 parent ac63e4a commit bbcf89a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ const getConfig = async (phase) => {
reactStrictMode: true,
swcMinify: true,
images: {
domains: ["oaknationalacademy-res.cloudinary.com"],
domains: [
"oaknationalacademy-res.cloudinary.com",
"live.staticflickr.com",
"images.unsplash.com",
],
},
transpilePackages: ["@oakai/api", "@oakai/db", "@oakai/exports"],
compiler: {
Expand Down
6 changes: 5 additions & 1 deletion apps/nextjs/src/app/image-spike/[slug]/images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useCallback, useState } from "react";

import type { Resource } from "ai-apps/image-alt-generation/types";
import Image from "next/image";
import Link from "next/link";

import LoadingWheel from "@/components/LoadingWheel";
Expand Down Expand Up @@ -287,15 +288,18 @@ const ImagesPage = ({ pageData }: { pageData: PageData }) => {
{column.imageSearchBatch && (
<div className="my-20 grid grid-cols-1 gap-10">
{column.imageSearchBatch?.map((image, i) => {
console.log("image", image.url);
return (
<div
key={image.id}
className="flex flex-col items-center gap-4"
>
<img
<Image
src={image.url}
alt={image.alt || "Image"}
className="w-full"
width={400}
height={400}
/>
<p>License: {image.license}</p>
{image.photographer && <p>By: {image.photographer}</p>}
Expand Down

0 comments on commit bbcf89a

Please sign in to comment.