@quevlu/resize-image-ratio
v3.0.0
Published
Resize image ratio with custom width and height. It returns one object with background and the new file
Downloads
9
Maintainers
Readme
resize-image-ratio
This library creates a new image file object and a preview from a file image object with a custom width an height keeping the same aspect ratio
Use
import resizeImageRatio from '@quevlu/resize-image-ratio';
const width = 640;
const height = 480;
const resizedFile = await resizeImageRatio(fileObject,width,height);
console.log(resizedFile);
{
file: fileResized,
preview: fileResizedPreview
}