https://github.com/xpodev/image-server-docs
https://github.com/xpodev/image-server-docs
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xpodev/image-server-docs
- Owner: xpodev
- Created: 2023-05-31T15:21:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T17:28:09.000Z (about 3 years ago)
- Last Synced: 2025-06-26T07:41:05.137Z (about 1 year ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Placeholder API Documentation
## API Endpoint
The API endpoint for generating placeholder images is:
`https://img.xpo.dev/{width}x{height}`
This will generate a placeholder image with the specified width and height.
For example:
- [https://img.xpo.dev/300x200](https://img.xpo.dev/300x200) - Generates a 300x200 pixels image.
- [https://img.xpo.dev/200](https://img.xpo.dev/200) - Generates a 200x200 pixels image.
## API Limitations
There are a few limitations and potential errors to note:
- The maximum image size is 15000x15000 pixels. If the requested size exceeds the maximum, an error will be returned.
- If the requested size is invalid, such as having negative values or not following the format `{width}x{height}`, an error will be returned.
## Error Responses
If an error occurs, the API will respond with an appropriate error message. The response will have a JSON format:
```json
{
"error": "Error message"
}
```
## Example
Here's an example of using the Image Placeholder API:
```html
```

---
## Submitting Issues
If you encounter any issues or have suggestions for improvement, please submit them on the [GitHub issue tracker](https://github.com/xpodev/image-server-docs/issues) for this project.
---