I have the default firebase resize extension installed. It's working perfectly but I realized I do not want the resize to proceed if the image is small, say 20Kb or less than 450Kb. I have edited the function source code to
logs.imageSize("Image Size in bytes: "+size);
let sizeInMB = parseFloat((size / (1024 * 1024)).toFixed(2));
logs.imageSize("Image Size in Mb: "+sizeInMB);
if(sizeInMB<=0.44){
// The image is 450KB do not compress
logs.imageIsSmall();
return;
}
it should return if the image is 450Kb or less than. Only this block of code is not running. The default resize still proceeds when a new object is added. The above logs also are not shown. What am i missing since, the above code is deployed and is currently on the source code