zenorocha/alloy-ui — pull request #96 by mthadley (2014-08-01 21:52:04+00:00)
Title: AUI-1586 YUI png assets corrupted during gulp build

Ticket: [AUI-1586](https://issues.liferay.com/browse/AUI-1586)

I'm not sure why, but removing `.pipe(replace('@VERSION@', alloy.yuiversion))` fixes the problem. My best guess is that `replace()` is matching the png files somehow, replacing some of the data, and causing them to be corrupted. The corrupted version of the file seem to contain alot of the same data as the original, but it's size is significantly different.

Either way, one solution is to just filter out the pngs with `gulp-filter` so that `replace()` is never ran on them. Let me know what you think, or maybe if there is a better way to fix this.

Thanks!