Giter Site home page Giter Site logo

grunt-cwebp's Introduction

grunt-cwebp's People

Contributors

1000ch avatar dependabot-preview[bot] avatar dependabot[bot] avatar thbp avatar therobhrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grunt-cwebp's Issues

lossless

Hi,
I tried to use grunt cwebp with "lossless" set with "true", but the task returns an error:
Warning: Command failed: /pat/to/cwebp path/to/img.jpg -o path/to/img.webp -q 92 -lossless true cannot open input file 'true' Error! Could not process file true Error! Cannot read input picture file 'true'

Can you help me to set properly my grunt task, please?

Tnx.

Doesn't work with grunt-newer

Grunt-newer doesn't work with grunt-cwebp. This is my configuration:

cwebp: {
    my_target: {
        options: {
            q: 65
        },
        files: [{ // converting all files in webp formate in "assets/img" folder dynamically to relavant folder
        	expand: true,
            cwd: 'assets/img',
            src: ['**/*.{png,jpg}'],
            dest: 'dist/webp/'
        }]
    }
}

Please help, its working fine with grunt-contrib-imagemin

pictures with gradient

Hi,
by running grunt cwebp, we noticed that images with a gradient are ruined. What parameters can be used to solve the problem?
We tried "alpha_filter" with "best" or "none", but it doesn't solve the issue.

("q" parameter is set to 92)

Tnx a lot.

bug(3.0.1): grunt-cwebp 3.0.1 doesn’t convert images to webp dynamically

1. Summary

See issue header.

grunt-cwebp 2.1.1 works as expected.

2. MCVE

You can see it in KiraCWebpDynamic branch of my repository for debugging.

2.1. Environment

  1. Ubuntu 20.04.1 LTS
  2. Node.js 14.11.0
  3. grunt 1.3.0
  4. grunt-cli 1.3.2
  5. grunt-cwebp 3.0.1

2.2. Gruntfile.coffee

module.exports = (grunt) ->

    grunt.loadNpmTasks 'grunt-cwebp'
    grunt.initConfig
        cwebp:
            dynamic:
                files: [
                    expand: true
                    cwd: '.'
                    src: "NeliaAutumnLeaves.jpg"
                    dest: '.'
                ]

    return

2.3. .travis.yml

os: linux

dist: focal

git:
  depth: 1

language: node_js

node_js:
- node

install:
- npm install -g grunt-cli
- npm install

script:
- grunt cwebp --verbose

3. Behavior

3.1. Expected

If [email protected]:

  • Travis:

    ✔ NeliaAutumnLeaves.jpg was converted to NeliaAutumnLeaves.webp
    

3.2. Current

Else 3.0.1:

NeliaAutumnLeaves.jpg not converted to NeliaAutumnLeaves.webp.

Thanks.

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.