Skip to content

Commit

Permalink
docs: update Image props (#48726)
Browse files Browse the repository at this point in the history
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: Steven <229881+styfle@users.noreply.github.com>
  • Loading branch information
afonsojramos and styfle authored Apr 23, 2023
1 parent 0670023 commit 2e99645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced-features/using-mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ import Image from 'next/image'
import { Heading, InlineCode, Pre, Table, Text } from 'my-components'

const ResponsiveImage = (props) => (
<Image alt={props.alt} layout="responsive" {...props} />
<Image alt={props.alt} sizes="100vw" style={ width: '100%', height: 'auto' } {...props} />
)

const components = {
Expand Down

0 comments on commit 2e99645

Please sign in to comment.