nuxt / nuxt/image

Nuxt Picture ignores width in request

Open
#201 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation question
Dominant language
TypeScript
Stars
1.5k
Forks
331
Avg merge
19h 52m
Merged PRs (30d)
9

Description

When I set the width for <nuxt-img>, it will make a request passing the corresponding width (two.jpg?w=200). However, when I tried it with <nuxt-picture>, it seems to ignore this and pass some larger width (one.jpg?w=1536).

<nuxt-picture src="img/one.jpg" width="200" />
<nuxt-img src="img/two.jpg" width="200" />

image

Not sure if this is a bug 🐛 or this is the expected behaviour 🤔. If it's the latter, is there any suggestion on how I can set the width when using <nuxt-picture>, so it's passed in the request. (ie. one.jpg?w=200&f=webp)? Thanks 🙂

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two requests from the issue using the provided and examples. Trace how handles its width value and verify whether the request uses w=200; done means the behavior is corrected or the expected behavior and configuration are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.