
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
fast-image-server
Advanced tools
Fast Image Server is an npm package that provides image serving functionality with a focus on converting images to webp format, generating thumbnails, and optimizing image delivery. It utilizes Node.js, Express.js, and includes built-in image caching capa
Fast Image Server is an npm package that provides image serving functionality with a focus on converting images to webp format, generating thumbnails, and optimizing image delivery. It utilizes Node.js, Express.js, and includes built-in image caching capabilities.
Install the package via npm:
npm install image-server
startServer
function from the package:const { startServer } = require('fast-image-server')
startServer({
sourceDir: "./high-quality-source-images",
optimizedDir: "./optimized-images",
thumbsDir: "./optimized-thumb-images",
previewDir: "./low-quality-preview-images"
}, 4000)
The second argument is the port which if not passed, will default to port 80
The server listens to requests at the path /images/:imageNameWithExtension
. For example:
GET /images/a.png
a.png
does not exist, returns 404a.png
exists, returns its corresponding webp formatGET /images/a.webp
a.png
a.png
or a.jpg
exists and then creates webp from thatGET /images/a.thumb.webp
a.png
GET /images/a.preview.webp
a.png
POST /images/generate-versions/a.png
a.png
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Fast Image Server is an npm package that provides image serving functionality with a focus on converting images to webp format, generating thumbnails, and optimizing image delivery. It utilizes Node.js, Express.js, and includes built-in image caching capa
The npm package fast-image-server receives a total of 1 weekly downloads. As such, fast-image-server popularity was classified as not popular.
We found that fast-image-server 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.