Have ideas to improve npm?Join in the discussion! »

    laravel-mix-webp

    0.1.1 • Public • Published

    Laravel Mix Webp

    Usage

    First, install the extension.

    npm install laravel-mix-webp --save-dev
    

    Then, add ImageWebp function on webpack.mix.js. like so:

    let mix = require('laravel-mix')
     
    require('laravel-mix-webp')
     
    mix
      .ImageWebp({
        from: 'resources/assets/images',
        to: 'public/assets/images',
      })

    Options

    Default

    {
         disable: false,
         from: 'resources',
         to: 'public',
         imageminWebpOptions: {
             quality: 50
         },
     }
    
    

    Only runs on production build

    {
        disable: process.env.NODE_ENV !== 'production',
    }
    

    Keywords

    Install

    npm i laravel-mix-webp

    DownloadsWeekly Downloads

    86

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    2.37 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar