Simple change images file type
npm install -g pictransform
To convert image file types to webp
, follow these steps:
- Move your images to a designated directory, such as images.
- Create another directory where the converted files will be saved, for example,
images-convert
. - Run the following command
pictransform ./images ./images-convert webp
After executing the command, the images-convert directory will contain the images converted to the webp format.
Make sure to install and configure pictransform
properly before executing the command