UNPKG

36.7 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../client/image.tsx"],"names":["window","global","__NEXT_IMAGE_IMPORTED","VALID_LOADING_VALUES","undefined","loaders","Map","imgixLoader","cloudinaryLoader","akamaiLoader","defaultLoader","VALID_LAYOUT_VALUES","isStaticRequire","src","default","isStaticImageData","isStaticImport","deviceSizes","configDeviceSizes","imageSizes","configImageSizes","loader","configLoader","path","configPath","domains","configDomains","process","env","__NEXT_IMAGE_OPTS","imageConfigDefault","allSizes","sort","a","b","getWidths","width","layout","sizes","viewportWidthRe","percentSizes","match","exec","push","parseInt","length","smallestRatio","Math","min","widths","filter","s","kind","Set","map","w","find","p","generateImgAttrs","unoptimized","quality","srcSet","last","i","join","getInt","x","defaultImageLoader","loaderProps","load","get","root","Error","VALID_LOADERS","removePlaceholder","img","placeholder","handleLoad","startsWith","decode","Promise","resolve","catch","then","style","backgroundSize","backgroundImage","complete","onload","Image","priority","loading","className","height","objectFit","objectPosition","blurDataURL","all","rest","staticSrc","staticImageData","JSON","stringify","widthInt","heightInt","qualityInt","NODE_ENV","includes","String","isNaN","console","warn","VALID_BLUR_EXT","isLazy","setRef","isIntersected","rootMargin","disabled","isVisible","wrapperStyle","sizerStyle","sizerSvg","imgStyle","position","top","left","bottom","right","boxSizing","padding","border","margin","display","minWidth","maxWidth","minHeight","maxHeight","quotient","paddingTop","overflow","imgAttributes","element","normalizeSrc","slice","params","paramsString","missingValues","parsedSrc","URL","err","error","hostname","encodeURIComponent"],"mappings":"wVAAA,oDACA,qEACA,qDACA,+DAMA,mDAEA,GAAI,MAAOA,CAAAA,MAAP,GAAkB,WAAtB,CAAmC,CACjC,CAAEC,MAAD,CAAgBC,qBAAhB,CAAwC,IAAxC,CACF,CAED,KAAMC,CAAAA,oBAAoB,CAAG,CAAC,MAAD,CAAS,OAAT,CAAkBC,SAAlB,CAA7B,CAaA,KAAMC,CAAAA,OAAO,CAAG,GAAIC,CAAAA,GAAJ,CAGd,CACA,CAAC,OAAD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,CAED,GAAI/C,GAAG,CAACiE,UAAJ,CAAe,IAAf,CAAJ,CAA0B,CACxB,KAAM,IAAIN,CAAAA,KAAJ,CACH,wBAAuB3D,GAAI,0GADxB,CAAN,CAGD,CAED,GAAI,CAACA,GAAG,CAACiE,UAAJ,CAAe,GAAf,CAAD,EAAwBpD,aAA5B,CAA2C,CACzC,GAAIyH,CAAAA,SAAJ,CACA,GAAI,CACFA,SAAS,CAAG,GAAIC,CAAAA,GAAJ,CAAQvI,GAAR,CAAZ,CACD,CAAC,MAAOwI,GAAP,CAAY,CACZvC,OAAO,CAACwC,KAAR,CAAcD,GAAd,EACA,KAAM,IAAI7E,CAAAA,KAAJ,CACH,wBAAuB3D,GAAI,iIADxB,CAAN,CAGD,CAED,GAAI,CAACa,aAAa,CAACiF,QAAd,CAAuBwC,SAAS,CAACI,QAAjC,CAAL,CAAiD,CAC/C,KAAM,IAAI/E,CAAAA,KAAJ,CACH,qBAAoB3D,GAAI,kCAAiCsI,SAAS,CAACI,QAAS,+DAA7E,CACG,8EAFC,CAAN,CAID,CACF,CACF,CAED,MAAQ,GAAEhF,IAAK,QAAOiF,kBAAkB,CAAC3I,GAAD,CAAM,MAAKuB,KAAM,MAAKwB,OAAO,EAAI,EAAG,EAA5E,CACD","sourcesContent":["import React from 'react'\nimport Head from '../next-server/lib/head'\nimport { toBase64 } from '../next-server/lib/to-base-64'\nimport {\n ImageConfig,\n imageConfigDefault,\n LoaderValue,\n VALID_LOADERS,\n} from '../next-server/server/image-config'\nimport { useIntersection } from './use-intersection'\n\nif (typeof window === 'undefined') {\n ;(global as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\ntype LoadingValue = typeof VALID_LOADING_VALUES[number]\n\nexport type ImageLoader = (resolverProps: ImageLoaderProps) => string\n\nexport type ImageLoaderProps = {\n src: string\n width: number\n quality?: number\n}\n\ntype DefaultImageLoaderProps = ImageLoaderProps & { root: string }\n\nconst loaders = new Map<\n LoaderValue,\n (props: DefaultImageLoaderProps) => string\n>([\n ['imgix', imgixLoader],\n ['cloudinary', cloudinaryLoader],\n ['akamai', akamaiLoader],\n ['default', defaultLoader],\n])\n\nconst VALID_LAYOUT_VALUES = [\n 'fill',\n 'fixed',\n 'intrinsic',\n 'responsive',\n undefined,\n] as const\ntype LayoutValue = typeof VALID_LAYOUT_VALUES[number]\n\ntype PlaceholderValue = 'blur' | 'empty'\n\ntype ImgElementStyle = NonNullable<JSX.IntrinsicElements['img']['style']>\n\ninterface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n}\n\ninterface StaticRequire {\n default: StaticImageData\n}\n\ntype StaticImport = StaticRequire | StaticImageData\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\ntype StringImageProps = {\n src: string\n} & (\n | { width?: never; height?: never; layout: 'fill' }\n | {\n width: number | string\n height: number | string\n layout?: Exclude<LayoutValue, 'fill'>\n }\n) &\n (\n | {\n placeholder?: Exclude<PlaceholderValue, 'blur'>\n blurDataURL?: never\n }\n | { placeholder: 'blur'; blurDataURL: string }\n )\n\ntype ObjectImageProps = {\n src: StaticImport\n width?: number | string\n height?: number | string\n layout?: LayoutValue\n placeholder?: PlaceholderValue\n blurDataURL?: never\n}\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'width' | 'height' | 'loading' | 'style'\n> & {\n loader?: ImageLoader\n quality?: number | string\n priority?: boolean\n loading?: LoadingValue\n unoptimized?: boolean\n objectFit?: ImgElementStyle['objectFit']\n objectPosition?: ImgElementStyle['objectPosition']\n} & (StringImageProps | ObjectImageProps)\n\nconst {\n deviceSizes: configDeviceSizes,\n imageSizes: configImageSizes,\n loader: configLoader,\n path: configPath,\n domains: configDomains,\n} =\n ((process.env.__NEXT_IMAGE_OPTS as any) as ImageConfig) || imageConfigDefault\n// sort smallest to largest\nconst allSizes = [...configDeviceSizes, ...configImageSizes]\nconfigDeviceSizes.sort((a, b) => a - b)\nallSizes.sort((a, b) => a - b)\n\nfunction getWidths(\n width: number | undefined,\n layout: LayoutValue,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes && (layout === 'fill' || layout === 'responsive')) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter(\n (s) => s >= configDeviceSizes[0] * smallestRatio\n ),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (\n typeof width !== 'number' ||\n layout === 'fill' ||\n layout === 'responsive'\n ) {\n return { widths: configDeviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n src: string\n unoptimized: boolean\n layout: LayoutValue\n loader: ImageLoader\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n src,\n unoptimized,\n layout,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(width, layout, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ src, quality, width: widths[last] }),\n }\n}\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'number') {\n return x\n }\n if (typeof x === 'string') {\n return parseInt(x, 10)\n }\n return undefined\n}\n\nfunction defaultImageLoader(loaderProps: ImageLoaderProps) {\n const load = loaders.get(configLoader)\n if (load) {\n return load({ root: configPath, ...loaderProps })\n }\n throw new Error(\n `Unknown \"loader\" found in \"next.config.js\". Expected: ${VALID_LOADERS.join(\n ', '\n )}. Received: ${configLoader}`\n )\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction removePlaceholder(\n img: HTMLImageElement | null,\n placeholder: PlaceholderValue\n) {\n if (placeholder === 'blur' && img) {\n const handleLoad = () => {\n if (!img.src.startsWith('data:')) {\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n img.style.filter = 'none'\n img.style.backgroundSize = 'none'\n img.style.backgroundImage = 'none'\n })\n }\n }\n if (img.complete) {\n // If the real image fails to load, this will still remove the placeholder.\n // This is the desired behavior for now, and will be revisited when error\n // handling is worked on for the image component itself.\n handleLoad()\n } else {\n img.onload = handleLoad\n }\n }\n}\n\nexport default function Image({\n src,\n sizes,\n unoptimized = false,\n priority = false,\n loading,\n className,\n quality,\n width,\n height,\n objectFit,\n objectPosition,\n loader = defaultImageLoader,\n placeholder = 'empty',\n blurDataURL,\n ...all\n}: ImageProps) {\n let rest: Partial<ImageProps> = all\n let layout: NonNullable<LayoutValue> = sizes ? 'responsive' : 'intrinsic'\n if ('layout' in rest) {\n // Override default layout if the user specified one:\n if (rest.layout) layout = rest.layout\n\n // Remove property so it's not spread into image:\n delete rest['layout']\n }\n\n let staticSrc = ''\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n if (!layout || layout !== 'fill') {\n height = height || staticImageData.height\n width = width || staticImageData.width\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n const widthInt = getInt(width)\n const heightInt = getInt(height)\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n throw new Error(\n `Image is missing required \"src\" property. Make sure you pass \"src\" in props to the \\`next/image\\` component. Received: ${JSON.stringify(\n { width, height, quality }\n )}`\n )\n }\n if (!VALID_LAYOUT_VALUES.includes(layout)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"layout\" property. Provided \"${layout}\" should be one of ${VALID_LAYOUT_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (\n (typeof widthInt !== 'undefined' && isNaN(widthInt)) ||\n (typeof heightInt !== 'undefined' && isNaN(heightInt))\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" or \"height\" property. These should be numeric values.`\n )\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (placeholder === 'blur') {\n if (layout !== 'fill' && (widthInt || 0) * (heightInt || 0) < 1600) {\n console.warn(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder='blur'\" property to improve performance.`\n )\n }\n if (!blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )}\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n }\n }\n let isLazy =\n !priority && (loading === 'lazy' || typeof loading === 'undefined')\n if (src && src.startsWith('data:')) {\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n\n const [setRef, isIntersected] = useIntersection<HTMLImageElement>({\n rootMargin: '200px',\n disabled: !isLazy,\n })\n const isVisible = !isLazy || isIntersected\n\n let wrapperStyle: JSX.IntrinsicElements['div']['style'] | undefined\n let sizerStyle: JSX.IntrinsicElements['div']['style'] | undefined\n let sizerSvg: string | undefined\n let imgStyle: ImgElementStyle | undefined = {\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n\n boxSizing: 'border-box',\n padding: 0,\n border: 'none',\n margin: 'auto',\n\n display: 'block',\n width: 0,\n height: 0,\n minWidth: '100%',\n maxWidth: '100%',\n minHeight: '100%',\n maxHeight: '100%',\n\n objectFit,\n objectPosition,\n\n ...(placeholder === 'blur'\n ? {\n filter: 'blur(20px)',\n backgroundSize: 'cover',\n backgroundImage: `url(\"${blurDataURL}\")`,\n }\n : undefined),\n }\n if (\n typeof widthInt !== 'undefined' &&\n typeof heightInt !== 'undefined' &&\n layout !== 'fill'\n ) {\n // <Image src=\"i.png\" width=\"100\" height=\"100\" />\n const quotient = heightInt / widthInt\n const paddingTop = isNaN(quotient) ? '100%' : `${quotient * 100}%`\n if (layout === 'responsive') {\n // <Image src=\"i.png\" width=\"100\" height=\"100\" layout=\"responsive\" />\n wrapperStyle = {\n display: 'block',\n overflow: 'hidden',\n position: 'relative',\n\n boxSizing: 'border-box',\n margin: 0,\n }\n sizerStyle = { display: 'block', boxSizing: 'border-box', paddingTop }\n } else if (layout === 'intrinsic') {\n // <Image src=\"i.png\" width=\"100\" height=\"100\" layout=\"intrinsic\" />\n wrapperStyle = {\n display: 'inline-block',\n maxWidth: '100%',\n overflow: 'hidden',\n position: 'relative',\n boxSizing: 'border-box',\n margin: 0,\n }\n sizerStyle = {\n boxSizing: 'border-box',\n display: 'block',\n maxWidth: '100%',\n }\n sizerSvg = `<svg width=\"${widthInt}\" height=\"${heightInt}\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"/>`\n } else if (layout === 'fixed') {\n // <Image src=\"i.png\" width=\"100\" height=\"100\" layout=\"fixed\" />\n wrapperStyle = {\n overflow: 'hidden',\n boxSizing: 'border-box',\n display: 'inline-block',\n position: 'relative',\n width: widthInt,\n height: heightInt,\n }\n }\n } else if (\n typeof widthInt === 'undefined' &&\n typeof heightInt === 'undefined' &&\n layout === 'fill'\n ) {\n // <Image src=\"i.png\" layout=\"fill\" />\n wrapperStyle = {\n display: 'block',\n overflow: 'hidden',\n\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n\n boxSizing: 'border-box',\n margin: 0,\n }\n } else {\n // <Image src=\"i.png\" />\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Image with src \"${src}\" must use \"width\" and \"height\" properties or \"layout='fill'\" property.`\n )\n }\n }\n\n let imgAttributes: GenImgAttrsResult = {\n src:\n 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',\n srcSet: undefined,\n sizes: undefined,\n }\n\n if (isVisible) {\n imgAttributes = generateImgAttrs({\n src,\n unoptimized,\n layout,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n }\n\n return (\n <div style={wrapperStyle}>\n {sizerStyle ? (\n <div style={sizerStyle}>\n {sizerSvg ? (\n <img\n style={{\n maxWidth: '100%',\n display: 'block',\n margin: 0,\n border: 'none',\n padding: 0,\n }}\n alt=\"\"\n aria-hidden={true}\n role=\"presentation\"\n src={`data:image/svg+xml;base64,${toBase64(sizerSvg)}`}\n />\n ) : null}\n </div>\n ) : null}\n {!isVisible && (\n <noscript>\n <img\n {...rest}\n {...generateImgAttrs({\n src,\n unoptimized,\n layout,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })}\n decoding=\"async\"\n style={imgStyle}\n className={className}\n />\n </noscript>\n )}\n <img\n {...rest}\n {...imgAttributes}\n decoding=\"async\"\n className={className}\n ref={(element) => {\n setRef(element)\n removePlaceholder(element, placeholder)\n }}\n style={imgStyle}\n />\n {priority ? (\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would likely cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n as=\"image\"\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n // @ts-ignore: imagesrcset is not yet in the link element type\n imagesrcset={imgAttributes.srcSet}\n // @ts-ignore: imagesizes is not yet in the link element type\n imagesizes={imgAttributes.sizes}\n ></link>\n </Head>\n ) : null}\n </div>\n )\n}\n\n//BUILT IN LOADERS\n\nfunction normalizeSrc(src: string): string {\n return src[0] === '/' ? src.slice(1) : src\n}\n\nfunction imgixLoader({\n root,\n src,\n width,\n quality,\n}: DefaultImageLoaderProps): string {\n // Demo: https://static.imgix.net/daisy.png?format=auto&fit=max&w=300\n const params = ['auto=format', 'fit=max', 'w=' + width]\n let paramsString = ''\n if (quality) {\n params.push('q=' + quality)\n }\n\n if (params.length) {\n paramsString = '?' + params.join('&')\n }\n return `${root}${normalizeSrc(src)}${paramsString}`\n}\n\nfunction akamaiLoader({ root, src, width }: DefaultImageLoaderProps): string {\n return `${root}${normalizeSrc(src)}?imwidth=${width}`\n}\n\nfunction cloudinaryLoader({\n root,\n src,\n width,\n quality,\n}: DefaultImageLoaderProps): string {\n // Demo: https://res.cloudinary.com/demo/image/upload/w_300,c_limit,q_auto/turtles.jpg\n const params = ['f_auto', 'c_limit', 'w_' + width, 'q_' + (quality || 'auto')]\n let paramsString = params.join(',') + '/'\n return `${root}${paramsString}${normalizeSrc(src)}`\n}\n\nfunction defaultLoader({\n root,\n src,\n width,\n quality,\n}: DefaultImageLoaderProps): string {\n if (process.env.NODE_ENV !== 'production') {\n const missingValues = []\n\n // these should always be provided but make sure they are\n if (!src) missingValues.push('src')\n if (!width) missingValues.push('width')\n\n if (missingValues.length > 0) {\n throw new Error(\n `Next Image Optimization requires ${missingValues.join(\n ', '\n )} to be provided. Make sure you pass them as props to the \\`next/image\\` component. Received: ${JSON.stringify(\n { src, width, quality }\n )}`\n )\n }\n\n if (src.startsWith('//')) {\n throw new Error(\n `Failed to parse src \"${src}\" on \\`next/image\\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)`\n )\n }\n\n if (!src.startsWith('/') && configDomains) {\n let parsedSrc: URL\n try {\n parsedSrc = new URL(src)\n } catch (err) {\n console.error(err)\n throw new Error(\n `Failed to parse src \"${src}\" on \\`next/image\\`, if using relative image it must start with a leading slash \"/\" or be an absolute URL (http:// or https://)`\n )\n }\n\n if (!configDomains.includes(parsedSrc.hostname)) {\n throw new Error(\n `Invalid src prop (${src}) on \\`next/image\\`, hostname \"${parsedSrc.hostname}\" is not configured under images in your \\`next.config.js\\`\\n` +\n `See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host`\n )\n }\n }\n }\n\n return `${root}?url=${encodeURIComponent(src)}&w=${width}&q=${quality || 75}`\n}\n"]}
\No newline at end of file