
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
canvas-image-compression
Advanced tools
一款基于 canvas 的前端压缩工具
canvas 开发 图片压缩工具react,vue,H5 多端适配运行canvas-image-compression 基于canvas API drawImage、及toDataURL对大于指定宽高(不指定是默认宽高400*500)的图片进行缩小尺寸压缩,不指定图片质量的情况下,默认原来图片质量的0.92。
npm install canvas-image-compression
在代码中 import 需要的组件并按照文档说明使用
import { Compression } from 'canvas-image-compression'
let compression = new Compression(maxWidth,maxHeight,imgQuilty);
let newfile = compression.compressionIMage(originFile);
FAQs
canvas image compression
The npm package canvas-image-compression receives a total of 31 weekly downloads. As such, canvas-image-compression popularity was classified as not popular.
We found that canvas-image-compression 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.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.