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

Improve documentation on densities prop usage #1465

Open
pascalwengerter opened this issue Aug 30, 2024 · 0 comments
Open

Improve documentation on densities prop usage #1465

pascalwengerter opened this issue Aug 30, 2024 · 0 comments

Comments

@pascalwengerter
Copy link

From reading https://image.nuxt.com/usage/nuxt-img#densities, it's not clear to me how to provide the assets in a way that NuxtImg can handle them.

The provided codesnippet:

<NuxtImg
  src="/logos/nuxt.png"
  height="50"
  densities="x1 x2"
/>
<!--
<img
  src="/_ipx/w_50/logos/nuxt.png" 
  srcset="/_ipx/w_100/logos/nuxt.png x2"
/>
-->

implies that there is something happening in the background, taking the height of 50 times 1x/2x and adding a w_ prefix for the resource URL?

Ideally, I'd wish for some more examples and/or an explanation on what to expect - my use case is providing images from the public folder.

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

1 participant