lup-images
v1.2.4
Published
Optimizes images for web applications
Downloads
251
Maintainers
Readme
lup-images
Node module for optimizing images in web applications.
Example Server
const { ImagesRequestHandler } = require('lup-images');
const express = require('express');
const app = express();
app.use('/images/*', ImagesRequestHandler());
app.listen();
Example JSX
<OptimizedImage src="https://picsum.photos/200/300" width={200} height={300} />
For NextJS
To work with NextJS you need to add the following to your next.config.js
:
experimental: {
serverComponentsExternalPackages: ["sharp"],
}