Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamazad/bildx
A self-hosted version of imgix built on top of Express.
https://github.com/adamazad/bildx
express hosting image-processing nodejs sharp
Last synced: about 3 hours ago
JSON representation
A self-hosted version of imgix built on top of Express.
- Host: GitHub
- URL: https://github.com/adamazad/bildx
- Owner: adamazad
- License: mit
- Created: 2020-09-18T08:28:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T20:09:57.000Z (almost 4 years ago)
- Last Synced: 2024-03-15T02:57:02.907Z (10 months ago)
- Topics: express, hosting, image-processing, nodejs, sharp
- Language: TypeScript
- Homepage:
- Size: 2.6 MB
- Stars: 26
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# BildX
[![Tests status](https://github.com/adamazad/bildx/workflows/Tests/badge.svg)](https://github.com/adamazad/bildx/actions)
The self-hosted version of [imgix](https://imgix.com/) for micro projects. PRs are welcome.
## Getting started
Install from via [npm](https://npmjs.com/package/bildx)
```
$ npm i bildx
```Create a instance, and call `start`. Put images in `storage`
```javascript
import BildX from "bildx"
import { resolve } from "path"const BILDX_PORT = process.env.BILDX_PORT || 4000
const bildx = new BildX({
storage: new BildXStorage(resolve("./storage")),
cache: new BildXStorage(resolve("./cache")),
})bildx.start(BILDX_PORT).then(() => console.log(`BildX deployed on ${BILDX_PORT}`))
```Note: `BildX.Storage` throws an error if path is not absolute.
## APIs
Currently, BildX supports:
- `width`
- `height`
- `fill`
- `blur`## Tests
```
$ npm test
```## WIP
- Implement all [the APIs](https://docs.imgix.com/apis/url) imgix provides
- Support for S3 and/or Firebase Storage