![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
express-sharp
Advanced tools
express-sharp adds real-time image processing routes to your express application. Images are processed with sharp, a fast Node.js module for resizing images.
$ npm install express-sharp --save
See sharp installation for additional installation instructions.
Example app.js:
'use strict';
var express = require('express');
var app = express();
var scale = require('express-sharp');
var options = {baseHost: 'mybasehost.com'};
app.use('/my-scale', scale(options));
app.listen(3000));
Render http://mybasehost.com/image.jpg
with 400x400 pixels:
GET /my-scale/resize/400?url=%2Fimage.jpg HTTP/1.1
Host: localhost:3000
--> invokes in background:
GET image.jpg HTTP/1.1
Host: mybasehost.com
Same as above, but with 80% quality, webp
image type and with progressive enabled:
GET /my-scale/resize/400?format=webp&quality=80&progressive=true&url=%2Fimage.jpg HTTP/1.1
Host: localhost:3000
var scale = require('express-sharp');
app.use('/some-path', scale(options));
Supported options:
baseHost
Specify the HTTP base host from which images will be requested.
cors
Specify CORS options as described in cors docs. Example:
app.use('/some-path', scale({
cors: {
origin: 'http://example.com'
}
}));
If not specified, a Access-Control-Allow-Origin: *
header is being sent.
format
Output image format.
Default: output format of the requested image.
Valid values: every valid sharp output format string, i.e. jpeg
, gif
, webp
or raw
.
progressive
See sharp docs.
Use &progressive=true
to enable progressive scan.
quality
See sharp docs.
quality is a Number between 1 and 100.
url
URL/path to original image.
FAQs
Real-time image processing for your express application
The npm package express-sharp receives a total of 432 weekly downloads. As such, express-sharp popularity was classified as not popular.
We found that express-sharp 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
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.