Nimbus is a powerful and scalable platform for converting images on-the-fly using the Sharp library. By simply providing a URL string, users can dynamically resize, crop, and transform images, which are then delivered through a custom architecture built on Vercel and Cloudflare. The original images are stored securely in AWS S3.
- Dynamic Image Processing: Convert and transform images using URL parameters.
- Scalable Architecture: Built on top of Vercel and Cloudflare for fast and reliable delivery.
- Secure Storage: Images are securely stored in AWS S3.
- High Performance: Leveraging the Sharp library for efficient image processing.
This is the architecture diagram of Nimbus.
To set up Nimbus locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/nimbus.git cd nimbus
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and configure the following variables:AWS_ACCESS_KEY_ID=your_aws_access_key AWS_SECRET_ACCESS_KEY=your_aws_secret_key S3_BUCKET_NAME=your_s3_bucket_name S3_REGION=your_s3_region
-
Run the development server:
npm run dev
-
Build for production:
npm run build
Alternatively, use it from https://nimbus.sbn.lol/ with the UI.
Once the server is running, you can start processing images by providing a URL string with the required parameters.
https://nbs.sbn.lol/image.png?url=https://example.com/image.jpg&width=500&height=500&format=png
url
: The URL of the image to be processed.width
: The desired width of the output image.height
: The desired height of the output image.format
: The output image format (e.g.,jpeg
,png
,webp
).quality
: Takes any value from1-100
.
The server will return the processed image with the specified dimensions and format.
Converts an image based on the provided query parameters.
url
(required): The URL of the image to convert.width
(optional): The desired width of the image.height
(optional): The desired height of the image.format
(optional): The desired format of the image (jpeg
,png
,webp
).
GET https://nbs.sbn.lol/image.png?url=https://example.com/image.jpg&width=500&height=500&format=png
Contributions are welcome! If you’d like to contribute to Nimbus, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
Please ensure your code follows the project's coding standards and includes tests where applicable.
This project is licensed under the MIT License - see the LICENSE file for details.