Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ipx
Advanced tools
Readme
High performance, secure and easy to use image proxy based on sharp and libvips.
You can use ipx
command to start server using:
$ npx ipx
The default server directory is the current working directory.
You can use IPX as a Connect/Express middleware or directly use ipx api.
import { createIPX, createIPXMiddleware } from "ipx";
const ipx = createIPX(/* options */);
const app = express();
app.use("/image", createIPXMiddleware(ipx));
The examples assume that a
static
folder withbuffalo.png
file is present in the directory where IPX server is running.
Change format to webp
and keep other things same as source:
http://localhost:3000/static/buffalo.png?format=webp
Keep original format (png
) and set width to 200
:
http://localhost:3000/static/buffalo.png?width=200
Resize to 200px
using embed
method and change format to webp
:
http://localhost:3000/static/buffalo.png?embed&format=webp&resize=200
Property | Reference | Example | Comments |
---|---|---|---|
width | _ | http://localhost:3000/buffalo.png?width=200 | |
height | _ | http://localhost:3000/buffalo.png?height=200 | |
trim | Ref | http://localhost:3000/buffalo.png?trim=100 | |
format | Ref | http://localhost:3000/buffalo.png?format=webp | Supported format: jpg, jpeg, png, webp, avif, gif, heif |
quality | _ | http://localhost:3000/buffalo.png?quality=50 | Accepted values: 0 to 100 |
rotate | Ref | http://localhost:3000/buffalo.png?rotate=45 | |
flip | Ref | http://localhost:3000/buffalo.png?flip | |
flop | Ref | http://localhost:3000/buffalo.png?flop | |
sharpen | Ref | http://localhost:3000/buffalo.png?sharpen=30 | |
median | Ref | http://localhost:3000/buffalo.png?median=10 | |
gamma | Ref | http://localhost:3000/buffalo.png?gamma=3 | |
negate | Ref | http://localhost:3000/buffalo.png?negate | |
normalize | Ref | http://localhost:3000/buffalo.png?normalize | |
threshold | Ref | http://localhost:3000/buffalo.png?threshold=10 | |
tint | Ref | http://localhost:3000/buffalo.png?tint=1098123 | |
grayscale | Ref | http://localhost:3000/buffalo.png?grayscale | |
animated | - | http://localhost:3000/buffalo.gif?animated | Experimental |
Config can be customized using IPX_*
environment variables.
IPX_DIR
.
(current working directory)IPX_DOMAINS
[]
MIT
FAQs
High performance, secure and easy-to-use image optimizer.
The npm package ipx receives a total of 241,821 weekly downloads. As such, ipx popularity was classified as popular.
We found that ipx demonstrated a healthy version release cadence and project activity because the last version was released less than 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 now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.