Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force aspect ratio #61

Closed
Larsklopstra opened this issue Oct 31, 2020 · 2 comments
Closed

Force aspect ratio #61

Larsklopstra opened this issue Oct 31, 2020 · 2 comments

Comments

@Larsklopstra
Copy link

Next.js forces an image to be a certain aspect ratio using inline styles, eg:

<div style="position: relative; padding-top: (aspect ratio); ...">
  <img style="position: absolute; ..." src="..." />
</div>

Now the outer container doesn't rely on a fixed width. A fixed width will break layouts in many cases

@Larsklopstra
Copy link
Author

image nuxtjs org_

Here's an example where the fixed width breaks the layout

@farnabaz
Copy link
Member

farnabaz commented Nov 3, 2020

Hey, Thank you for the issue and your explaination
The current release is just a WIP version for internal tests. In the next release, Nuxt/image will be fully responsive and does not force any fixed width. As you mentions it will only preserve aspect ratio of the image.

I close the issue because this already done inside the repo.
The next release will be out as soon as module meet its release check list.

@farnabaz farnabaz closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants