Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: image.max is not a function #144

Open
retan opened this issue Feb 16, 2020 · 2 comments
Open

Error: image.max is not a function #144

retan opened this issue Feb 16, 2020 · 2 comments

Comments

@retan
Copy link

retan commented Feb 16, 2020

Usage of max configuration option causes an error image.max is not a function.
From what I can tell the error comes from sharp, and occurs because the max function was deprecated - see: https://sharp.pixelplumbing.com/changelog#v0210---4supthsup-october-2018

[15:39:56] Error in plugin "gulp-responsive"
Message:
    File `xxx.jpg`: image.max is not a function
Details:
    domainEmitter: [object Object]
    domainThrown: false

Stack:
    at DestroyableTransform.through2Handler [as _transform] (D:\...\node_modules\gulp-responsive\lib\index.js:98:14)
@robinloeffel
Copy link

Since this project seems to be inactive, even just for the moment (#111), I've gone ahead and created a completely new plugin for this purpose on my own: https://github.com/robinloeffel/gulp-rezzy. It uses sharp under the hood, as well.

@seb-celinedesign
Copy link

Sharp max function is deprecated. Instead we need to use the Sharp fit param.
I made a pull request that add the fit param to gulp-responsive config : #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants