First, please see here: Imagemin issue
You say that it works out of the box without any customizations?
What have you done to customize the theme assets?
Here’s what I would do:
- Remove all contents of
assets/images/
andassets/fonts/
and attempt another build; if it succeeds then begin adding those assets back one file at a time to find any problematic files - If #1 doesn’t work then remove all custom files again but instead of adding them all back add them back one by one, testing whether the build will work after each add