nuxt / nuxt/image

Support for regular sizes attribute

Open
#1,437 1 comment 6 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

Right now I have to use the breakpoints provided by Nuxt (e.g xs, md, sm...) to set my image sizes. This prevents me from using breakpoints outside of the predefined ones and makes it hard to do detailed adjustments.

IMO it also adds an unnecessary abstraction layer that makes using this component more difficult then it should be. Issues like #1413, #1434 and #1433 wouldn't be a thing with the normal behaviour that we are used to.

Are there any technical reasons why it has been implemented in that way?
I guess that this makes it easier to work with it in Tailwind, but IMO this package shouldn't be opinionated. I would prefer if the current breakpoint functionality would be optional.

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 tracing how the image component currently handles Nuxt breakpoint names for its sizes attribute, then review related issues #1413, #1434, and #1433. Define how standard sizes values and the existing breakpoint behavior can coexist, with completion requiring custom non-predefined breakpoints to work without removing the current optional functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.