This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Resizes an Image File and converts it to a dataurl string. | |
* @param imageFile the image file (probably from a file input) | |
* @param resize_width The width you want the image to be | |
* @param quality quality of the resize image 0 - 1 | |
*/ | |
const resizeImage = ({ | |
resizeWidth = 400, | |
imageFile, | |
quality = 1, |