lucataco/featured-img
Convert images down to a web friendly size while maintaining image quality
Public
10
runs
Run lucataco/featured-img with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
Field | Type | Default value | Description |
---|---|---|---|
image |
string
|
Input image to compress for web use
|
|
quality |
integer
|
85
Min: 10 Max: 100 |
JPEG quality (10-100, higher = better quality but larger file)
|
format |
None
|
JPEG
|
Output format for web optimization
|
progressive |
boolean
|
True
|
Use progressive encoding for JPEG (loads incrementally)
|
{
"type": "object",
"title": "Input",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image to compress for web use"
},
"format": {
"enum": [
"JPEG",
"WebP",
"PNG"
],
"type": "string",
"title": "format",
"description": "Output format for web optimization",
"default": "JPEG",
"x-order": 2
},
"quality": {
"type": "integer",
"title": "Quality",
"default": 85,
"maximum": 100,
"minimum": 10,
"x-order": 1,
"description": "JPEG quality (10-100, higher = better quality but larger file)"
},
"progressive": {
"type": "boolean",
"title": "Progressive",
"default": true,
"x-order": 3,
"description": "Use progressive encoding for JPEG (loads incrementally)"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "string",
"title": "Output",
"format": "uri"
}
Example API response
View prediction
'https://replicate.delivery/xezq/WkmwtJj91wJOBpKAlitPvy8YXGJRwcYKQfe2ab2tkZjafAeVB/compressed_image.jpg'