rsnext/test/integration/image-component/default/pages/invalid-src-proto-relative.js
Steven 80fd3d5d17
Print error when Image src is protocol-relative (#18809)
This PR prints a pretty error when the Image `src` property is a [protocol-relative URL](https://www.paulirish.com/2010/the-protocol-relative-url/).

> Update 2014.12.17:
> Now that SSL is encouraged for everyone and doesn’t have performance concerns, this technique is now an anti-pattern. If the asset you need is available on SSL, then always use the https:// asset.

Fixes #18536
2020-11-04 20:47:49 +00:00

13 lines
258 B
JavaScript

import React from 'react'
import Image from 'next/image'
const Page = () => {
return (
<div>
<p>Invalid Protocol Relative Source</p>
<Image src="//assets.example.com/img.jpg" width="10" height="10" />
</div>
)
}
export default Page