![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
img-convertor
Advanced tools
img-convertor
is a command-line tool based on Node.js and the Sharp library for batch image conversion and resizing. It supports various image formats and can recursively process all images in the specified directory.
Before using this tool, ensure that Node.js and npm are installed. Then run the following command to install the tool globally:
npm install -g img-convertor
This tool provides two main commands: converter
and resize
.
Use the converter
command to convert the format of all images in a directory:
converter <sourceTypes> <targetType>
<sourceTypes>
: The source image formats to convert (e.g., png,jpg,jpeg
). Optional, defaults to png,jpg,jpeg,webp,gif,bmp
.<targetType>
: The target image format (e.g., png
, jpeg
, webp
). Optional, defaults to png
.Example:
converter jpg png
Converts all .jpg
images in the current directory to .png
format and saves them in the output
directory.
Use the resize
command to resize images:
resize <sourceTypes> <targetType> <width> <height>
<sourceTypes>
: The source image formats to resize (e.g., png,jpg,jpeg
). Optional, defaults to png,jpg,jpeg,webp,gif,bmp
.<targetType>
: The target image format (e.g., png
, jpeg
, webp
). Optional, defaults to png
.<width>
and <height>
: Specify the target width and height of the images in pixels.Example:
resize jpg png 800 600
Converts all .jpg
images in the current directory to .png
format, resizes them to 800x600 pixels, and saves them in the output
directory.
png
, jpg
, jpeg
, webp
, gif
, bmp
.jpeg
, png
, webp
, tiff
, gif
, avif
, svg
.output
folder in the current directory.<sourceTypes>
and <targetType>
are not provided, the program will use default values.This tool is built on the sharp library. Please ensure your environment supports this library.
img-convertor
是一个基于 Node.js 和 Sharp 库的命令行工具,用于批量转换和调整图像大小。它支持多种图像格式,并且可以递归处理指定目录中的所有图片。
在使用前,请确保已安装 Node.js 和 npm,然后执行以下命令来全局安装此工具:
npm install -g img-convertor
该工具提供两个主要命令:converter
和 resize
。
使用 converter
命令转换目录中的所有图片格式:
converter <sourceTypes> <targetType>
<sourceTypes>
:要转换的源图像格式(例如:png,jpg,jpeg
)。可选,默认支持 png,jpg,jpeg,webp,gif,bmp
。<targetType>
:目标图像格式(例如:png
、jpeg
、webp
等)。可选,默认为 png
。示例:
converter jpg png
将当前目录中的所有 .jpg
图片转换为 .png
格式,并保存在 output
目录中。
使用 resize
命令调整图片大小:
resize <sourceTypes> <targetType> <width> <height>
<sourceTypes>
:要调整大小的源图像格式(例如:png,jpg,jpeg
)。可选,默认支持 png,jpg,jpeg,webp,gif,bmp
。<targetType>
:目标图像格式(例如:png
、jpeg
、webp
等)。可选,默认为 png
。<width>
和 <height>
:指定目标图片的宽度和高度,单位为像素。示例:
resize jpg png 800 600
将当前目录中的所有 .jpg
图片转换为 .png
格式,并调整大小为 800x600 像素,结果保存在 output
目录中。
png
、jpg
、jpeg
、webp
、gif
、bmp
。jpeg
、png
、webp
、tiff
、gif
、avif
、svg
。output
文件夹中。<sourceTypes>
和 <targetType>
,程序会使用默认值。本工具基于 sharp 库开发,请确保您的环境支持此库。
FAQs
A CLI tool for image conversion and resizing using Node.js and Sharp.
The npm package img-convertor receives a total of 4 weekly downloads. As such, img-convertor popularity was classified as not popular.
We found that img-convertor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.