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

Use loader only for large images #14

Open
wlingke opened this issue Apr 26, 2018 · 2 comments
Open

Use loader only for large images #14

wlingke opened this issue Apr 26, 2018 · 2 comments

Comments

@wlingke
Copy link

wlingke commented Apr 26, 2018

Is there a way to only use this loader for large images? Similar to url-loader's limit option. I probably don't want to use this for the images that are already small :)

@wlingke
Copy link
Author

wlingke commented Apr 26, 2018

To be a bit more specific, if I have this configuration for the loaders:

const imageLoaders = [
  {
    loader: 'lqip-loader',
    options: {
      path: '/lqip',
      name: '[name]_[hash].[ext]',
      base64: true,
    },
  },
  {
    loader: 'url-loader',
    options: {
      name: '[name]_[hash].[ext]',
      limit: 5000,
    },
  },
]

For small images <5000B, I'd be loading both a LQIP version and a full version into base64 right?

@zouhir
Copy link
Owner

zouhir commented May 23, 2018

very smart idea but not possible at the moment. I would like to add it.

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