
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
oss-img-processor
Advanced tools
这是一个oss处理图片的函数,主要处理图片尺寸信息和图片格式转换。 它会自动判断当前浏览器是否支持webp格式,当你需要转换图片的时候(png to jpg),如果当前浏览器支持webp,则以webp格式转换,否则转为jpg。
Installation
npm install --save oss-img-processor
Usage
// main.js
import resizeImg from 'oss-img-processor/lib/index';
Vue.prototype.$resizeImg = resizeImg;
例子
// 将图片大小以`宽度`为基准,按比例设置为 `width=200` 的图片`且`开启图片转换
<img :src="$resizeImg(url, 200, 0, true)" alt="">
// 将图片大小以`高度`为基准,按比例设置为 `height=200` 的图片`且`开启图片转换
<img :src="$resizeImg(url, 0, 200, true)" alt="">
// 将图片大小以`宽度`为基准,按比例设置为 `width=200` 的图片`不`开启图片转换
<img :src="$resizeImg(url, 200, 0)" alt="">
FAQs
a img resize tool
We found that oss-img-processor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.