Rump Images is a Rump module that handles images with support for image optimizations via imagemin and high density "retina" images. (retina support requires GraphicsMagick) For more information, visit the core repository.
The following is appended to the core Rump API:
This module adds the following tasks:
build:images
will process and copy images from source to destination. This task is also added to thebuild
task. Images that end with@2x
(logo@2x.png
) will have copies made without the@2x
(logo.png
) and at half the resolution of the original. For more information on source and destination paths seerump.configure()
below. This task is also added to thebuild
task.watch:images
will runbuild:images
, then monitor for changes and process updated files as needed. This task is also added to thewatch
task.info:images
will display information on what this specific module does, specifically the source and destination paths as well as what files would get processed as well as those that would get retina copies. This task is also added to theinfo
task.
Redefine options for Rump and Rump modules to follow. In addition to what options Rump and other Rump modules offer, the following options are available alongside default values:
This specifies whether to process images through imagemin. (processed if
true
) By default images are minified only if the environment is set to
production. (visit the main Rump repository for more information on
environment)
This specifies whether to create non-retina version of images. (denoted by
@2x
) By default this option is turned off. (If you turn on
GraphicsMagick is required)
This specifies additional options for gulp-imagemin.
This is the directory where images to be copied are contained. This path is
relative to the root source path. (If the default root and images path is used,
then the path would be src/images
)
This is the directory where images are copied to. This path is relative to the
root destination path. (If the default root and images path is used, then the
path would be dist/images
)
This specifies which images to process. By default it processes all GIF/JPEG/PNG/SVG images, including those in subdirectories.
This specifies which images to monitor for changes. By default it watches all GIF/JPEG/PNG/SVG images, including those in subdirectories.