Skip to content

ggondim/azure-functions-resize-proxy

Repository files navigation

azure-functions-resize-proxy

A simple Azure Function to resize images given an external URL.

How to use

This repository was generated with Azure Functions Core Tools.

To deploy it to Azure, you can use the button below or clone the repository and publish using Azure Functions Core Tools from vscode or CLI.

Deploy to Azure

After publishing, use the resize function from endpoint, i.e.:

https://yourfunctionname.azurewebsites.net/api/resize?url=IMAGEURL&h=120

URL parameters

YOURFUNCTIONENDPOINT?url=IMAGEURL&h=RESIZEHEIGHT[&cache=SECONDSTOCACHE]

url required

The image URL that you want to resize.

h required

The height of resized image.

For now, this function only supports proportinal resizing. Passing the height parameter will calculate automatically the new image witdh.

cache optional

A time in seconds to respond with Cache-Control header.

Example: &cache=7200 will force HTTP Response to include header Cache-Control: max-age=7200 (2 hours).

About

Built with Jimp and Azure Functions Middlewares ❤.

Licensed under MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published