Add error handling to `imagemin`
ehmicky opened this issue · comments
imagemin
can fail when images are invalid. For example:
Error in file: _site/images/dev-notes/louyang_give_random_options.gif
gifsicle:/tmp/dc6ecfb2-8c1d-42e0-885b-21156391edb5:#91: read error: missing 48918 pixels of image data
gifsicle:/tmp/dc6ecfb2-8c1d-42e0-885b-21156391edb5:#91: fatal error: too many missing pixels, giving up
This is currently being reported as a plugin error. try
/catch
and utils.build.failBuild()
should be used instead to report this as a user error.