
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@aftership/grunt-resize-crop
Advanced tools
Make images a specific size without distorting the aspect ratio. Resizes as close as possible and crops the rest.
Make images a specific size without distorting the aspect ratio. Resizes as close as possible and crops the rest.
This plugin is a wrapper for resize-crop
This plugin requires Grunt ~0.4.4
-- Learn to use Grunt
Install the plugin with this command:
npm install grunt-resize-crop --save-dev
Enable in your Gruntfile with:
grunt.loadNpmTasks('grunt-resize-crop');
In your project's Gruntfile, add a section named resize_crop
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
resize_crop: {
image_group: {
options: {
gravity: "center",
height: 200,
width: 200
},
files: [{
expand: true, // Enable dynamic expansion.
cwd: 'img/src', // Src matches are relative to this path.
src: ['**/*_[0-9].jpg'], // Actual pattern(s) to match.
dest: 'img/dist' // Destination path prefix.
}]
}
}
});
integer
integer
string
"center"
will try to keep the centermost part of the image and only remove the furthest edges.In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
FAQs
Make images a specific size without distorting the aspect ratio. Resizes as close as possible and crops the rest.
The npm package @aftership/grunt-resize-crop receives a total of 3 weekly downloads. As such, @aftership/grunt-resize-crop popularity was classified as not popular.
We found that @aftership/grunt-resize-crop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.