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

[Feature Request] Default preset #9

Open
whaaaley opened this issue Jun 9, 2022 · 1 comment
Open

[Feature Request] Default preset #9

whaaaley opened this issue Jun 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@whaaaley
Copy link

whaaaley commented Jun 9, 2022

It would be nice if there were a way to specify a default preset so every import didn't need the query string.

Maybe something like this...

    imagePresets({
      'default': widthPreset({
        widths: [425, 1024, 1200],
        formats: {
          webp: { quality: 100 },
          png: { quality: 100 }
        }
      })
    }),

Or this...

    imagePresets({
      'foobar': widthPreset({
        default: true,
        widths: [425, 1024, 1200],
        formats: {
          webp: { quality: 100 },
          png: { quality: 100 }
        }
      })
    }),

Great plugin btw 👍 It's saved me a lot of time already.

@ElMassimo ElMassimo added the enhancement New feature or request label Jun 9, 2022
@ElMassimo
Copy link
Owner

Hi Dustin, thanks for the suggestion!

That would involve processing every image referenced in the project, so wouldn't recommend it for most projects, but in smaller sites it might be a nice one to have.

Ideally, we would detect if there's a default preset during init, and use that flag to avoid these checks instead checking by image extension.

PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants