https://github.com/danilqa/image-proxy-service
🌄 A basic implementation of the image proxy service
https://github.com/danilqa/image-proxy-service
example image-proxy service sharp
Last synced: 9 months ago
JSON representation
🌄 A basic implementation of the image proxy service
- Host: GitHub
- URL: https://github.com/danilqa/image-proxy-service
- Owner: Danilqa
- Created: 2023-10-03T15:22:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T14:23:24.000Z (about 2 years ago)
- Last Synced: 2025-03-29T06:22:25.371Z (10 months ago)
- Topics: example, image-proxy, service, sharp
- Language: TypeScript
- Homepage:
- Size: 37.1 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Proxy Service
```
http://localhost:4000/image
/resize:200:200
/quality:40
/greyscale
/url/https://.../my-image-1.jpg
@avif
```
```
http://localhost:4000/image
/blur:80
/resize:200
/url/https://.../my-image-2.jpg
@webp
```
⚠️ This is a basic implementation intended for educational purposes and does not meet all production requirements.
However, it provides a great foundation for further development.
Based on [node-file-router](https://github.com/Danilqa/node-file-router) and [sharp](https://github.com/lovell/sharp).
## Features
1. Resize
2. Compress
3. Change format
4. Greyscale
5. Tint
6. Blur
Caching is not implemented. It's expected that it will be on cloud-side.
## Start
1. Install dependencies:\
`pnpm install`
2. Run a script:\
`pnpm dev`
3. Open `localhost:4000`
## Examples
Several working examples can be found in `examples.html`