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

Support for regular sizes attribute #1437

Open
AdrianFahrbach opened this issue Aug 23, 2024 · 1 comment
Open

Support for regular sizes attribute #1437

AdrianFahrbach opened this issue Aug 23, 2024 · 1 comment

Comments

@AdrianFahrbach
Copy link

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.

@stijns96
Copy link

The only reason I can think of is the automatically generated srcset. However, even this is on most cases not enough. At my job, I've created something lile this module and concluded that this is really hard to automate.

I use storyblok, and one of the problems already comes with dynamic content. I can set my size to md:50vw which will give me the 1x and 2x of the half of 768px, but imagine that a client is uploading an image of 40px max. The image will not break, but stil it doesn't make sense.

I personally think that I'm better of with an onwly created component for now...

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