using Node JS, Express, Sharp
- Resize images with different formats
- Supported format: png, jpg, jpeg, webp
PATH: /api/images
Method: GET
Parameter | Required |
---|---|
filename | Yes |
width | Yes |
height | No (default height = width) |
Example:
/api/images?filename=imagename.jpg&width=200&height=300
Extenstion can be omitted, new image will be jpg
by default
/api/images?filename=imagename&width=200&height=300
Height can be omitted, height of new image will be same as width
/api/images?filename=imagename.jpg&width=200