mahnunchik / gulp-responsive

gulp-responsive generates images at different sizes
https://npmjs.com/gulp-responsive
MIT License
503 stars 60 forks source link

Image extension changed after latest release #113

Closed thomasjsn closed 5 years ago

thomasjsn commented 5 years ago

My jpg images got jpeg extensions after the latest release (2.13.0), is this intentional? All my images got new filenames because of this.

I'm not against this per se, and can adapt to these changes. But I'd like to know if it's likely to change back.

Siilwyn commented 5 years ago

Can confirm, I rolled back to 2.12.0.

sergeymorkovkin commented 5 years ago

Confirm!

pepelsbey commented 5 years ago

Same here. I tried to use extname: '.jpg' parameter here and there, no luck.

TheDancingCode commented 5 years ago

I would revert the changes in #112. The multiple formats option isn't working and this line that it introduced is now causing this issue.

khalyomede commented 5 years ago

Same here, I did this:

const img = () =>
  src(["src/img/**/*.{png,jpg,jpeg,svg}", "!src/img/icon.png"])
    .pipe(plumber())
    .pipe(
      responsive({
        "**/*.*": [
          {
            width: 600,
            rename: {
              suffix: "-mobile"
            }
          },
          {
            width: 992,
            rename: {
              suffix: "-tablet"
            }
          },
          {
            width: 1200,
            rename: {
              suffix: "-laptop"
            }
          },
          {
            rename: {
              suffix: "-desktop"
            }
          }
        ]
      })
    )
    .pipe(imagemin())
    .pipe(dest("dist/img"))
    .pipe(webp())
    .pipe(dest("dist/img"))
    .pipe(browser.stream());

Even if I did not specified recipes for jpeg files specifically, the plugin did changed the extension, like it forced to output .jpeg instead of "keeping" the source extension.

Got that output:

[12:09:04] gulp-responsive: shoe\P908341D-439.jpg -> shoe\P908341D-439-mobile.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-439.jpg -> shoe\P908341D-439-tablet.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-439.jpg -> shoe\P908341D-439-laptop.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-439.jpg -> shoe\P908341D-439-desktop.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-441.jpg -> shoe\P908341D-441-mobile.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-441.jpg -> shoe\P908341D-441-tablet.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-441.jpg -> shoe\P908341D-441-laptop.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-441.jpg -> shoe\P908341D-441-desktop.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-707.jpg -> shoe\P908341D-707-mobile.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-707.jpg -> shoe\P908341D-707-tablet.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-707.jpg -> shoe\P908341D-707-desktop.jpeg
[12:09:04] gulp-responsive: shoe\P908341D-707.jpg -> shoe\P908341D-707-laptop.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-100.jpg -> shoe\P908480DE-100-mobile.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-100.jpg -> shoe\P908480DE-100-tablet.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-100.jpg -> shoe\P908480DE-100-desktop.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-100.jpg -> shoe\P908480DE-100-laptop.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-707.jpg -> shoe\P908480DE-707-mobile.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-707.jpg -> shoe\P908480DE-707-tablet.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-707.jpg -> shoe\P908480DE-707-laptop.jpeg
[12:09:05] gulp-responsive: shoe\P908480DE-707.jpg -> shoe\P908480DE-707-desktop.jpeg
[12:09:05] gulp-responsive: Created 76 images (matched 19 of 19 images)
[12:09:05] gulp-imagemin: Minified 0 images
[12:09:19] Finished 'img' after 17 s
[12:09:19] Starting 'reload'...
[12:09:19] Finished 'reload' after 870 μs
[Browsersync] Reloading Browsers...
AddoSolutions commented 5 years ago

Same issue, any hacky fixes yet? Tried rename: f=>f.origin to no avail

StarpTech commented 5 years ago

The PR https://github.com/mahnunchik/gulp-responsive/pull/129 fixed many issues. Please try and open another issue.