Unverified Commit 2e99645b authored by Afonso Jorge Ramos's avatar Afonso Jorge Ramos Committed by GitHub

docs: update Image props (#48726)

Hey! Hope this can help anyone dealing with this in the future.

I'm also using the `TinaMarkdown` provider to generate my MDX and one of the things that I've found helpful so that the image was better handled in the browser was to set position to `undefined`, as it was the only way to unset it from `absolute`, which was affecting the visual aspect of the page.
Co-authored-by: 's avatarSteven <229881+styfle@users.noreply.github.com>
parent 06700235
...@@ -191,7 +191,7 @@ import Image from 'next/image' ...@@ -191,7 +191,7 @@ import Image from 'next/image'
import { Heading, InlineCode, Pre, Table, Text } from 'my-components' import { Heading, InlineCode, Pre, Table, Text } from 'my-components'
const ResponsiveImage = (props) => ( const ResponsiveImage = (props) => (
<Image alt={props.alt} layout="responsive" {...props} /> <Image alt={props.alt} sizes="100vw" style={ width: '100%', height: 'auto' } {...props} />
) )
const components = { const components = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment