A production-ready Azure Function application that dynamically resizes images stored in Azure Blob Storage via HTTP GET requests, supporting all popular image formats.
- JPEG/JPG - With full quality control
 - PNG - Transparency preserved
 - GIF - Animated GIF support
 - BMP - Bitmap format
 - WebP - Modern web format
 
- ✅ HTTP GET triggered
 - ✅ Dynamic resizing (width, height)
 - ✅ Automatic aspect ratio preservation
 - ✅ Quality control (1-100)
 - ✅ Format conversion (e.g., PNG → WebP)
 - ✅ Multiple resize modes (max, crop, pad, stretch)
 - ✅ CDN/Front Door cache support
 - ✅ Logic App integration
 - ✅ Application Insights monitoring
 - ✅ Comprehensive error handling and logging
 - ✅ Unit test coverage
 
resizer-logicapp-poc/
├── src/                        # Main application code
│   ├── ImageResizer.cs         # Image resize logic
│   ├── Program.cs              # Function host configuration
│   ├── host.json               # Function host settings
│   ├── local.settings.json     # Local development settings
│   └── logic-app-workflow.json # Logic App integration
├── tests/                      # Test project
│   ├── ImageResizerTests.cs    # Unit tests
│   └── *.csproj                # Test project file
├── docs/                       # Documentation
│   └── DEPLOYMENT.md           # Deployment guide
├── .gitignore                  # Git ignore rules
└── README.md                   # This file
- .NET 8 SDK
 - Azure Functions Core Tools
 - Azure Storage Account
 
- Clone the repository:
 
git clone https://github.com/zenigmadev/resizer-logicapp-poc.git
cd resizer-logicapp-poc- Configure local.settings.json:
 
{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
    "StorageConnectionString": "YOUR_STORAGE_CONNECTION_STRING",
    "StorageContainerName": "images",
    "APPLICATIONINSIGHTS_CONNECTION_STRING": "YOUR_APP_INSIGHTS_CONNECTION_STRING"
  }
}- Build the project:
 
cd src
dotnet build- Run tests:
 
cd ../tests
dotnet test- Start the function:
 
cd ../src
func starthttps://<function-app-name>.azurewebsites.net/api/<image-path>?<parameters>
| Parameter | Alias | Description | Example | 
|---|---|---|---|
w | 
width | 
Width in pixels | w=800 | 
h | 
height | 
Height in pixels | h=600 | 
q | 
quality | 
Quality (1-100, default: 85) | q=90 | 
format | 
output | 
Output format (jpeg, png, webp, gif, bmp) | format=webp | 
mode | 
- | Resize mode (max, crop, pad, stretch) | mode=crop | 
- max (default): Fits within specified dimensions while preserving aspect ratio
 - crop: Crops to exact dimensions
 - pad: Fits within dimensions and pads empty space
 - stretch: Stretches to exact dimensions
 
https://myapp.azurewebsites.net/api/photos/landscape.jpg?w=800
https://myapp.azurewebsites.net/api/photos/portrait.png?h=600
https://myapp.azurewebsites.net/api/photos/product.jpg?w=400&h=300
https://myapp.azurewebsites.net/api/photos/logo.png?w=200&format=webp
https://myapp.azurewebsites.net/api/photos/hero.jpg?w=1920&q=95
https://myapp.azurewebsites.net/api/photos/profile.jpg?w=150&h=150&mode=crop
https://myapp.azurewebsites.net/api/products/category1/item-photo.jpg?w=500
# Create Function App
az functionapp create \
  --resource-group rg-image-resizer \
  --consumption-plan-location westeurope \
  --runtime dotnet-isolated \
  --runtime-version 8 \
  --functions-version 4 \
  --name func-image-resizer-prod \
  --storage-account mystorageaccount
# Create Application Insights
az monitor app-insights component create \
  --app func-image-resizer-insights \
  --location westeurope \
  --resource-group rg-image-resizer \
  --application-type web
# Configure connection strings
az functionapp config appsettings set \
  --name func-image-resizer-prod \
  --resource-group rg-image-resizer \
  --settings \
    StorageConnectionString="YOUR_CONNECTION_STRING" \
    StorageContainerName="images" \
    APPLICATIONINSIGHTS_CONNECTION_STRING="YOUR_APP_INSIGHTS_CONNECTION_STRING"
# Deploy
cd src
func azure functionapp publish func-image-resizer-prodFor detailed deployment instructions, see DEPLOYMENT.md.
cd tests
dotnet testResult: 15/15 tests passed ✅
While the function is running:
# Test 1: Width only
curl "http://localhost:7071/api/test-image.jpg?w=500" -o resized.jpg
# Test 2: Format conversion
curl "http://localhost:7071/api/test-image.jpg?w=300&format=webp" -o resized.webp
# Test 3: Crop mode
curl "http://localhost:7071/api/test-image.jpg?w=300&h=300&mode=crop" -o thumbnail.jpg| Scenario | Consumption Plan | Premium Plan | CDN Cache Hit | 
|---|---|---|---|
| Cold Start | 2-5 seconds | <500ms | N/A | 
| Warm Request | 100-500ms | 50-200ms | <50ms | 
| Throughput | ~100 req/s | ~1000 req/s | ~10000 req/s | 
Application Insights monitors the following metrics:
- Request rate and response time
 - Failure rate and exceptions
 - Dependency calls (Blob Storage)
 - Custom metrics (image size, format, etc.)
 - Performance counters
 
View metrics in Azure Portal → Application Insights → Performance.
- 
Change Authorization Level:
[HttpTrigger(AuthorizationLevel.Function, "get", Route = "{*imagePath}")]
 - 
Configure CORS:
az functionapp cors add --name myImageResizerApp \ --resource-group myResourceGroup \ --allowed-origins https://yourdomain.com
 - 
Use Managed Identity: Prefer Managed Identity over connection strings for Blob Storage access.
 - 
Rate Limiting: Add rate limiting via Azure Front Door WAF policy.
 
Pull requests are welcome. For major changes, please open an issue first.
- Fork the repository
 - Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
 
See CONTRIBUTING.md for details.
MIT License - See LICENSE for details.
For questions, please use GitHub Issues.
- SixLabors.ImageSharp - Image processing library
 - Azure Functions - Serverless compute
 
Developer: Zenigma Dev
Version: 1.0.0
Last Updated: October 10, 2025