Git Product home page Git Product logo

grunt-webp's People

Contributors

edzis avatar jsonzhang avatar paazmaya avatar shinnn avatar somerandomdude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grunt-webp's Issues

Retain folder structure?

Is there a way to traverse and entire directory & subdirectories creating WebP images whilst retaining their location as the same as the src location?

Folders get created unnecessarily for generated WebPs

Here's the snippet from my Grunt.js

    dist:{
      files: [{
        expand: true, 
        cwd: 'src/img',
        src:['*.jpg'],
        dest:'src/img/',
        ext:'.jpg.webp'
        }],
    },
      options:{
        quality:85,
    },
  },

When ever I run grunt webp, folders with name as [filename].jpg.webp get created and the actual .webp files reside inside them.

I don't want this to happen. I want my actual webp files to have the name [filename].jpg.webp and no extra folders should be created (as the dest is already mentioned).

Cannot open input file, Cannot read input picture file

Hi,
I think I've followed the README but I've run into some issues - this is what I've done. I've taken this project and run npm install grunt-webp --save then npm install webp-bin --save, my Gruntfile.js looks like this.

module.exports = function(grunt) {

  'use strict';

  grunt.initConfig({

    webp: {
      files: {
        src: 'images/photoshop/*.png',
        dest: 'images/webp'
      },
      options: {
        binpath: require('webp-bin').path,
        preset: 'default',
        verbose: true
      }
    }

  });

  grunt.loadNpmTasks('grunt-webp');

};

I think this looks ok, but when I run grunt webp I get the following output;

Running "webp:files" (webp) task
/Users/masonj/Development/image-optimisation-tools-comparison/node_modules/webp-bin/vendor/osx/cwebp -preset default -v images/photoshop/png24-interlaced_bril.png,images/photoshop/png24-interlaced_grote-ogen.png,images/photoshop/png24-interlaced_logo.png,images/photoshop/png24-interlaced_oog.png,images/photoshop/png24-interlaced_patroon.png,images/photoshop/png24-interlaced_rood.png,images/photoshop/png24-interlaced_skyline.png,images/photoshop/png24-interlaced_streepjes.png,images/photoshop/png24-interlaced_wolk.png,images/photoshop/png24_bril.png,images/photoshop/png24_grote-ogen.png,images/photoshop/png24_logo.png,images/photoshop/png24_oog.png,images/photoshop/png24_patroon.png,images/photoshop/png24_rood.png,images/photoshop/png24_skyline.png,images/photoshop/png24_streepjes.png,images/photoshop/png24_wolk.png,images/photoshop/png8-interlaced_bril.png,images/photoshop/png8-interlaced_grote-ogen.png,images/photoshop/png8-interlaced_logo.png,images/photoshop/png8-interlaced_oog.png,images/photoshop/png8-interlaced_patroon.png,images/photoshop/png8-interlaced_rood.png,images/photoshop/png8-interlaced_skyline.png,images/photoshop/png8-interlaced_streepjes.png,images/photoshop/png8-interlaced_wolk.png,images/photoshop/png8_bril.png,images/photoshop/png8_grote-ogen.png,images/photoshop/png8_logo.png,images/photoshop/png8_oog.png,images/photoshop/png8_patroon.png,images/photoshop/png8_rood.png,images/photoshop/png8_skyline.png,images/photoshop/png8_streepjes.png,images/photoshop/png8_wolk.png -o .webpimages/webp
Error! Cannot open input file 'images/photoshop/png24-interlaced_bril.png,images/photoshop/png24-interlaced_grote-ogen.png,images/photoshop/png24-interlaced_logo.png,images/photoshop/png24-interlaced_oog.png,images/photoshop/png24-interlaced_patroon.png,images/photoshop/png24-interlaced_rood.png,images/photoshop/png24-interlaced_skyline.png,images/photoshop/png24-interlaced_streepjes.png,images/photoshop/png24-interlaced_wolk.png,images/photoshop/png24_bril.png,images/photoshop/png24_grote-ogen.png,images/photoshop/png24_logo.png,images/photoshop/png24_oog.png,images/photoshop/png24_patroon.png,images/photoshop/png24_rood.png,images/photoshop/png24_skyline.png,images/photoshop/png24_streepjes.png,images/photoshop/png24_wolk.png,images/photoshop/png8-interlaced_bril.png,images/photoshop/png8-interlaced_grote-ogen.png,images/photoshop/png8-interlaced_logo.png,images/photoshop/png8-interlaced_oog.png,images/photoshop/png8-interlaced_patroon.png,images/photoshop/png8-interlaced_rood.png,images/photoshop/png8-interlaced_skyline.png,images/photoshop/png8-interlaced_streepjes.png,images/photoshop/png8-interlaced_wolk.png,images/photoshop/png8_bril.png,images/photoshop/png8_grote-ogen.png,images/photoshop/png8_logo.png,images/photoshop/png8_oog.png,images/photoshop/png8_patroon.png,images/photoshop/png8_rood.png,images/photoshop/png8_skyline.png,images/photoshop/png8_streepjes.png,images/photoshop/png8_wolk.png'
Error! Cannot read input picture file 'images/photoshop/png24-interlaced_bril.png,images/photoshop/png24-interlaced_grote-ogen.png,images/photoshop/png24-interlaced_logo.png,images/photoshop/png24-interlaced_oog.png,images/photoshop/png24-interlaced_patroon.png,images/photoshop/png24-interlaced_rood.png,images/photoshop/png24-interlaced_skyline.png,images/photoshop/png24-interlaced_streepjes.png,images/photoshop/png24-interlaced_wolk.png,images/photoshop/png24_bril.png,images/photoshop/png24_grote-ogen.png,images/photoshop/png24_logo.png,images/photoshop/png24_oog.png,images/photoshop/png24_patroon.png,images/photoshop/png24_rood.png,images/photoshop/png24_skyline.png,images/photoshop/png24_streepjes.png,images/photoshop/png24_wolk.png,images/photoshop/png8-interlaced_bril.png,images/photoshop/png8-interlaced_grote-ogen.png,images/photoshop/png8-interlaced_logo.png,images/photoshop/png8-interlaced_oog.png,images/photoshop/png8-interlaced_patroon.png,images/photoshop/png8-interlaced_rood.png,images/photoshop/png8-interlaced_skyline.png,images/photoshop/png8-interlaced_streepjes.png,images/photoshop/png8-interlaced_wolk.png,images/photoshop/png8_bril.png,images/photoshop/png8_grote-ogen.png,images/photoshop/png8_logo.png,images/photoshop/png8_oog.png,images/photoshop/png8_patroon.png,images/photoshop/png8_rood.png,images/photoshop/png8_skyline.png,images/photoshop/png8_streepjes.png,images/photoshop/png8_wolk.png'
255Error! Cannot open input file 'images/photoshop/png24-interlaced_bril.png,images/photoshop/png24-interlaced_grote-ogen.png,images/photoshop/png24-interlaced_logo.png,images/photoshop/png24-interlaced_oog.png,images/photoshop/png24-interlaced_patroon.png,images/photoshop/png24-interlaced_rood.png,images/photoshop/png24-interlaced_skyline.png,images/photoshop/png24-interlaced_streepjes.png,images/photoshop/png24-interlaced_wolk.png,images/photoshop/png24_bril.png,images/photoshop/png24_grote-ogen.png,images/photoshop/png24_logo.png,images/photoshop/png24_oog.png,images/photoshop/png24_patroon.png,images/photoshop/png24_rood.png,images/photoshop/png24_skyline.png,images/photoshop/png24_streepjes.png,images/photoshop/png24_wolk.png,images/photoshop/png8-interlaced_bril.png,images/photoshop/png8-interlaced_grote-ogen.png,images/photoshop/png8-interlaced_logo.png,images/photoshop/png8-interlaced_oog.png,images/photoshop/png8-interlaced_patroon.png,images/photoshop/png8-interlaced_rood.png,images/photoshop/png8-interlaced_skyline.png,images/photoshop/png8-interlaced_streepjes.png,images/photoshop/png8-interlaced_wolk.png,images/photoshop/png8_bril.png,images/photoshop/png8_grote-ogen.png,images/photoshop/png8_logo.png,images/photoshop/png8_oog.png,images/photoshop/png8_patroon.png,images/photoshop/png8_rood.png,images/photoshop/png8_skyline.png,images/photoshop/png8_streepjes.png,images/photoshop/png8_wolk.png'
Error! Cannot read input picture file 'images/photoshop/png24-interlaced_bril.png,images/photoshop/png24-interlaced_grote-ogen.png,images/photoshop/png24-interlaced_logo.png,images/photoshop/png24-interlaced_oog.png,images/photoshop/png24-interlaced_patroon.png,images/photoshop/png24-interlaced_rood.png,images/photoshop/png24-interlaced_skyline.png,images/photoshop/png24-interlaced_streepjes.png,images/photoshop/png24-interlaced_wolk.png,images/photoshop/png24_bril.png,images/photoshop/png24_grote-ogen.png,images/photoshop/png24_logo.png,images/photoshop/png24_oog.png,images/photoshop/png24_patroon.png,images/photoshop/png24_rood.png,images/photoshop/png24_skyline.png,images/photoshop/png24_streepjes.png,images/photoshop/png24_wolk.png,images/photoshop/png8-interlaced_bril.png,images/photoshop/png8-interlaced_grote-ogen.png,images/photoshop/png8-interlaced_logo.png,images/photoshop/png8-interlaced_oog.png,images/photoshop/png8-interlaced_patroon.png,images/photoshop/png8-interlaced_rood.png,images/photoshop/png8-interlaced_skyline.png,images/photoshop/png8-interlaced_streepjes.png,images/photoshop/png8-interlaced_wolk.png,images/photoshop/png8_bril.png,images/photoshop/png8_grote-ogen.png,images/photoshop/png8_logo.png,images/photoshop/png8_oog.png,images/photoshop/png8_patroon.png,images/photoshop/png8_rood.png,images/photoshop/png8_skyline.png,images/photoshop/png8_streepjes.png,images/photoshop/png8_wolk.png'
Warning: 255 Use --force to continue.

Aborted due to warnings.

Any help would be appreciated, thanks a lot @somerandomdude.

Tag and publish to npm

Please make a minor release so that the binpath option becomes available via npm install.

Add option to define the location of cwebp binary

My Linux distribution comes with outdated version of WebP, thus I would like to use the one I download by hand.
Thus requesting an option for defining the path for the cwebp binary, which would default to 'cwebp'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.