nuxt / nuxt/image

props.quality should be applied only to formats where it makes a difference

Open
#374 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello! I'm using the IPX provider and writing a wrapper component for nuxt-img to deal with image quirks specific to the app I'm working in.

I'm passing props to nuxt-img like quality which I have set as default: 90 to set a standard quality reduction that can be changed if needed for specific use cases. nuxt-img is applying this value to SVGs which appears to have no effect.

It would make more sense for nuxt-img's q to be omitted where it does not make a difference.

Screenshot of such a case attached:
image

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

Inspect the nuxt-img handling of the quality prop and generated q parameter, starting with the code path that determines the image format. Verify the behavior for SVGs and other formats, then confirm that q is omitted where it has no effect with the relevant tests or URL output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.