New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-image-autoresize

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-image-autoresize

Auto-resize images larger than a certain size

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-image-autoresize

Automatically resizes images if the width or height is greater than a certain dimension. Keeps the aspect ratio.

For example, let's say you set the maximum dimension setting to 1000px. If an image is 2000x1000px, it gets resizes it to 1000x500px. If the image is 1000x2000px, it becomes 500x1000px.

The default max dimension is 800 pixels and can be changed. With the default option, the 2000x1000px image would be resized to 800x400px.

This uses ImageMagick, so it requires ImageMagick to be installed. Thus this only supports images supported by ImageMagick.

Config

grunt.initConfig({
    image_autoresize: {
        target_name_here: {
            maxdimension: 1000, // optional
            files: [{
              cwd: 'current working directory here',
              src: '**/*.{png,jpg}',
              dest: 'some output directory here'
            }]
        }
    }
})

The files value is an array of objects, the specifics of which can be read in Grunt globbing pattern docs.

Example configuration

grunt.initConfig({
    image_autoresize: {
        target_name_here: {
            files: [{
              cwd: 'static/img',
              src: '**/*.{png,jpg}',
              dest: 'public/img'
            }]
        }
    }
})

FAQs

Package last updated on 10 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc