Skip to content
Snippets Groups Projects
Commit cb47e1c0 authored by Quoc Huy Nguyen Dinh's avatar Quoc Huy Nguyen Dinh
Browse files

Sharp's crop() is deprecated

parent ff34821e
No related branches found
No related tags found
No related merge requests found
...@@ -319,7 +319,7 @@ export async function proxyHandler(ctx: KoaContext) { ...@@ -319,7 +319,7 @@ export async function proxyHandler(ctx: KoaContext) {
switch (options.mode) { switch (options.mode) {
case ScalingMode.Cover: case ScalingMode.Cover:
image.rotate().resize(width, height).crop() image.rotate().resize(width, height, {fit: 'cover'})
break break
case ScalingMode.Fit: case ScalingMode.Fit:
if (!width) { width = maxWidth } if (!width) { width = maxWidth }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment