Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Add error handling to imagemin #29

@ehmicky

Description

@ehmicky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions