Git Product home page Git Product logo

Comments (8)

code-mattclaffey avatar code-mattclaffey commented on July 19, 2024

I fixed the issue. It does have an option of 'quality' but it would be better if it was in the documentation.

from gulp-responsive-images.

dcgauld avatar dcgauld commented on July 19, 2024

Glad you sorted out the issue. Agree that the documentation is severely lacking. When I get some time I'll try to write some better docs.

from gulp-responsive-images.

code-mattclaffey avatar code-mattclaffey commented on July 19, 2024

If need be I can add it to the readme if you dont have the time?

from gulp-responsive-images.

code-mattclaffey avatar code-mattclaffey commented on July 19, 2024

I tried to update the readme to this but I didnt have access.

gulp-responsive-images

A simple Gulp plugin that allows the resizing and renaming of images, primarily for responsive applications. It uses GraphicsMagick to allow simple resizing, cropping, quality control and more.

Install

Install with npm.

npm install --save-dev gulp-responsive-images

GraphicsMagick

gulp-responsive-images requires GraphicsMagick to function. Installation is simple:

Ubuntu:

apt-get install graphicsmagick

Mac OS X (using Homebrew):

brew install graphicsmagick

Common Options

// Image.js

var images = {
  'hero.png': [
      {
      crop: false,
      format: null,
      gravity: 'Center',
      height: 100,
      overwrite: true,
      quality: 100,
      rename: null,
      percentage: false,
      sharpen: false,
      suffix: '-100'
      upscale: false,
      width: 100
    }
  ]
};

module.exports = images;      

});

Example

var gulp = require('gulp');
var responsive = require('gulp-responsive-images');
var images = require('/path/to/images.js');

gulp.task('default', function () {
  gulp.src('source/images/**/*')
    .pipe(responsive(images))
    .pipe(gulp.dest('dist/images'));
});

from gulp-responsive-images.

dcgauld avatar dcgauld commented on July 19, 2024

Awesome! I'll get this in ASAP. Thanks for your help.

from gulp-responsive-images.

OleVik avatar OleVik commented on July 19, 2024

@dcgauld You really should update the readme with the options code-mattclaffey specified above, they are paramount for using the package. Also, a way of specifying them for the entire pipeline would be ideal: For example setting the quality of all images to 85 unless overridden by specific configurations.

The package deserves attention, as it is one of preciously few alternatives to gulp-responsive with sharp, of which the latter is very painful to install and maintain on Windows. GraphicsMagick, on the other hand, is great!

from gulp-responsive-images.

dcgauld avatar dcgauld commented on July 19, 2024

Agreed, will get around to updating the README soon. If you have improvement suggestions, why not open a pull request? :)

from gulp-responsive-images.

OleVik avatar OleVik commented on July 19, 2024

I did a quick pull request with an updated README.

from gulp-responsive-images.

Related Issues (5)

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.