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

Wrong extension - extname ignored (jpeg instead of jpg) #136

Open
krisdante opened this issue Dec 12, 2019 · 2 comments
Open

Wrong extension - extname ignored (jpeg instead of jpg) #136

krisdante opened this issue Dec 12, 2019 · 2 comments

Comments

@krisdante
Copy link

This is my config:

return gulp.src('static-full/team/*.{jpg,png}')
      .pipe(responsive({  
  
          '*': [
              {
                  width: 480,
                  rename: {
                      extname: '.jpg',                      
                  },
                  quality: 80,
                  format: 'jpeg'
              }, 
              {
                  width: 480,
                  rename: {
                      extname: '.webp',                      
                  },
                  format: 'webp'
              }
          ],
      }

Extname is '.jpg' but when I execute it files are name .jpeg not .jpg
It seems that extreme is ignored.

@krisdante krisdante changed the title Wrong extension - exname ignored (jpeg instead of jpg) Wrong extension - extname ignored (jpeg instead of jpg) Dec 12, 2019
@robinloeffel
Copy link

robinloeffel commented Feb 18, 2020

Since this project seems to be inactive (#111), I've gone ahead and created a new plugin for the purpose of resizing your images: https://github.com/robinloeffel/gulp-rezzy.

You can use gulp-rezzy together with gulp-webp (and gulp-imagemin) to achieve your goal. Pipe your assets to gulp-rezzy, then gulp-imagemin, then write the stream (your jpg images) to the disk, pipe them to gulp-webp and at the end write stream (your webp images) to the disk again.

Edit: This is exactly what I do here, actually: https://github.com/robinloeffel/swissplant/blob/master/gulpfile.js#L89

@m90
Copy link

m90 commented Feb 21, 2020

I "fixed" this by locking my package version to 2.7.0 which still keeps the correct file extensions.

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

3 participants