Skip to content

script to compress all images in a given directory

Notifications You must be signed in to change notification settings

imas234/squoosh-many

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

squoosh-many

Script that uses @squoosh/lib to compress all images in a given directory into an output folder.

Images are also resized to have a width of 1000 if their width is greater than 1000. Smaller images are unaffected.

known issues:

  • tall images, larger height than width, get turned 90 degrees before conversion - so they have to be rotated. Also, this means that image will now have a height of maximum: 1000.

usage

  • clone the repo
  • in cli, yarn install, to install dependencies
  • yarn start directory_filepath, replace directory filepath with the filepath of the directory (folder) containing your images. should look something like /home/user/Desktop/images, for example (varies with OS)

About

script to compress all images in a given directory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published