- 使用nextjs的组件:
import Image from "next/image"; <Image src="xxx" alt="图片" width={300} height={300} /> - 加入允许跨域:
在next.config.js中加入const nextConfig = { images: { domains: ["images.doc.ceo"] } } module.exports = nextConfig;
不然会出现:Error: Invalid src prop (https://images.dog.ceo/breeds/terrier-westhighland/n02098286_617.jpg) on next/image', hostname "images.dog.ceo"is notconfigured under images in your next, config.jsSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host



![[管理与领导-10]:IT基层管理者 - 目标、责任、落实 - 如何把管理者的高高在上的目标,落地、落实到团队实施](https://img-blog.csdnimg.cn/bbea0431a876466f8b77eda378424e20.png)
















