Bulk-generates optimal image filesizes for FurAffinity usage.
npm install fa-thumbs --save
Modify run.bat
so that it takes two arguments: an input directory, and an output directory.
node test.js "./input" "./output"
pause
Or modify test.js
so that it takes the same two arguments for the required function. The first argument can be an array or string, and the second is an options object:
{
output: "/path/to/output/folder",
suffix: "_lowres",
recursive: false,
width: 1280,
height: 1280,
mime: "image/jpeg",
quality: 80
}
output
is the path to the output folder where the scaled-down images will besuffix
is the appendix to a filename string so that it's distinguished from the original resrecursive
is a Boolean for retrieving files in subfolders of the input directorywidth
andheight
are the preferred dimensions of the output imagesmime
is the image MIME type:"image/jpeg"
or"image/png"
quality
is the preferred JPEG quality of the output images
If options is a string, it is treated as the output
value. All other values default if not included.