import Image, { ImageProps } from "next/image"; import ViewSource from "../../components/view-source"; import styles from "../../styles.module.css"; // Note: we cannot use `priority` or `loading="eager" // because we depend on the default `loading="lazy"` // behavior to wait for CSS to reveal the proper image. type Props = Omit & { srcLight: string; srcDark: string; }; const ThemeImage = (props: Props) => { const { srcLight, srcDark, ...rest } = props; return ( <> ); }; const Page = () => (

Image With Light/Dark Theme Detection

); export default Page;