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

Not changing the .png or .jpg to .webp extension #19

Open
matheusggds opened this issue May 28, 2019 · 5 comments
Open

Not changing the .png or .jpg to .webp extension #19

matheusggds opened this issue May 28, 2019 · 5 comments

Comments

@matheusggds
Copy link

Is that a problem?

The images are smaller, but, will that image still work correctly?

gulp.task('images-min', () => {
	return gulp.src(paths.images)
		.pipe(imagemin([
			webp({
				lossless: true
			})
		]))
		.pipe(gulp.dest(`${paths.build}/images`));
});
@stot3
Copy link

stot3 commented May 29, 2019

I can also confirm I'm having the same problem.

promise = imageMin([filePath], tmpdir ,{ use: [ imageMinWebP({quality: 80}) ] } )

is how I am calling it, and I am trying to convert a jpg to a webp, I instead get a .jpg path returned instead.

@stot3
Copy link

stot3 commented May 29, 2019

promise = imageMin([filePath], tmpdir ,{ plugins: [ imageMinWebP({quality: 80}) ] } )

also returns the same problem.

@Th3S4mur41
Copy link

Th3S4mur41 commented Feb 18, 2020

I'm facing the same problem with grunt...
This is an issue, since I use imagemin to compress my images in both JPEG and WEBP to support all browsers, but the WEBP output overwrites the JPEG output.

@kelly-tock
Copy link

same issue here, what's the deal?

@kelly-tock
Copy link

oh, I was using the node api,

async function main() {
  const files = await imagemin(['img/*.{jpg,png}'], {
    destination: 'webp',
    plugins: [
      webp({
        quality: 75, // Losslessly encode images
      }),
    ],
  });

  console.log(files);
}

main();

works.

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

4 participants