Replies: 1 comment
-
|
If I recall correctly, you need gulp.src(configuration.source + "/**/*.jpg", { encoding: false }) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a small convenience library that I use for creating responsive images. It uses
through2, withsharpto do the actual conversion. I'm running onnodev25.8.1 on MacOS X.This runs without problems under
gulp4.0.2. However, if I switch togulp5.0.1, callingsharponfile.contents(wherefileis a Vinyl stream) fails withsharpreporting "Input buffer contains unsupported image format".I dumped out the contents of the buffer, and it is indeed not a valid image. The JPEG header had been trashed, and the rest of the file partly overwritten with garbage data. The file had also bloated to almost twice its previous size.
The problem is definitely caused by the migration from
gulp4.x to 5.x; that's the only difference between the version that works and the one that doesn't.I suspect that if
gulp5.x were routinely mangling Vinyl streams then someone would probably have said something by now, so it must be that something about my code that was safe to do under 4.x is no longer possible under 5.x. Can anyone suggest what might have happened, and how I can fix this to work with 5.x? Thanks.Beta Was this translation helpful? Give feedback.
All reactions