Real-Time Media Optimization Network

ImagEngine

Real-time image optimization, intelligent WebP conversion, responsive dynamic resizing, and SVG vector rendering proxy.

Try Interactive Playground → Explore API Scenarios

Protected Origin Whitelisting

ImagEngine operates on an authorized tenant whitelist to prevent abuse and guarantee maximum performance. Want to accelerate your media domain?

Request Domain Whitelist →

Real-Time WebP Conversion

Automatically compresses heavy JPEG and PNG assets into lightweight WebP with high bandwidth savings and sharp visual clarity.

SVG Vector Rasterization

Renders dynamic Open Graph cards, candidate badges, and typography banners directly from SVG source files into crisp social media formats.

Face-Anchored & Smart Crop

Generate square avatars and custom thumbnails with top-anchoring (position=top) so portraits and faces are never cut off.

Multi-Tier Global Caching

Optimized images are cached for 1 year with immutable ETag validators. Subsequent requests load in single-digit milliseconds.

1. URL Syntax & Routing

ImagEngine supports both slug-based and query-parameter based routing:

Pattern A: Slug-based Extension URL (Recommended for SEO)
https://<domain>/[subdomain.]<tenant>/<path>-<origExt>.<targetExt>[?params]
Pattern B: Dot Slug URL
https://<domain>/[subdomain.]<tenant>/<path>.<origExt>.<targetExt>[?params]
Pattern C: Direct Path with Format Query Parameter
https://<domain>/[subdomain.]<tenant>/<path>.<origExt>[?format=<targetExt>&params]

2. Currently Whitelisted Tenants

The first path segment specifies the origin property. Requests to unauthorized domains are safely dropped at the network edge:

Tenant Key Resolved Origin Domain Sample Tenant Route
tn topnepali.com /objects.tn/... → objects.topnepali.com
ginfo grisma.info.np /ginfo/... → grisma.info.np
gcom grisma.com.np /object.gcom/... → object.grisma.com.np
gname grisma.name.np /gname/... → grisma.name.np
ecn election.gov.np /ecn/... → election.gov.np

Need your domain or CDN added? Contact us to request domain whitelisting.

3. Production Scenarios & Examples

Scenario 01

Social Media OG Image (SVG → WebP at 1200x630)

Render dynamic Open Graph SVG cards into crisp WebP for Facebook, Viber, and Twitter crawlers.

GET /objects.tn/wp-content/uploads/2026/10/banner-svg.webp?w=1200&h=630&fit=cover

Vector graphics and fonts are rasterized into pixel-perfect WebP and globally cached for 1 year.

Scenario 02

Candidate & Profile Avatar (Square Crop Anchored to Face)

Generate 256x256 square avatars anchored to the top so heads and faces are never chopped off.

# Quick avatar preset:
GET /ecn/candidates/kamal-png.webp?avatar=1

# Or custom avatar dimensions:
GET /ecn/candidates/kamal-png.webp?w=300&h=300&fit=cover&position=top
Scenario 03

Proportional Aspect-Ratio Resizing (Single Dimension)

Supply either width or height alone; ImagEngine automatically calculates the other dimension maintaining exact aspect ratio without distortion.

# Resize to 500px width (auto height):
GET /object.gcom/uploads/photo.jpg?w=500&format=webp

# Resize to 400px height (auto width):
GET /object.gcom/uploads/photo.jpg?h=400&format=webp
Scenario 04

Fit Modes: 600x600 from a 1000x1120 Portrait Photo

Control exact cropping and fitting behavior when providing both width and height:

Fit Parameter Behavior Example URL
fit=cover Recommended: Crops excess edges to fill the exact 600x600 box without stretching. ?w=600&h=600&fit=cover
fit=contain Preserves full image within 600x600 bounds (aspect ratio preserved, no cropping). ?w=600&h=600&fit=contain
fit=fill Forces image to fill 600x600, stretching if aspect ratio differs. ?w=600&h=600&fit=fill
fit=inside Scales down to be as large as possible while staying completely within dimensions. ?w=600&h=600&fit=inside
Scenario 05

Crop Alignment & Coordinate Pre-Cropping

When cropping with fit=cover, control which anchor is preserved:

?w=600&h=600&fit=cover&position=center   # Default: center crop
?w=600&h=600&fit=cover&position=top      # Top anchor (perfect for portraits & faces)
?w=600&h=600&fit=cover&position=bottom   # Bottom anchor
?w=600&h=600&fit=cover&position=left     # Left anchor
?w=600&h=600&fit=cover&position=right    # Right anchor

Coordinate Pre-Crop (cw & ch): Extract centered coordinate windows before scaling:

# Center Vertical Crop (preserves full width, crops height centered):
GET /object.gcom/banner.webp?ch=300

# Center Horizontal Crop (preserves full height, crops width centered):
GET /object.gcom/banner.webp?cw=600

# Center Dual-Axis Crop (crops both width & height centered):
GET /object.gcom/banner.webp?cw=600&ch=300

# Pre-Crop + Target Output Resize:
GET /object.gcom/banner.webp?cw=800&ch=400&w=400&h=200
Scenario 06

Format Transformations & Passthrough

Source Target Behavior
SVG WebP Renders crisp vector to raster at target size, encodes to lightweight WebP.
SVG PNG Direct rasterization into lossless PNG format.
SVG SVG Untouched Stream: Returns pristine SVG directly with 1-year cache.
JPEG WebP Decodes JPEG, applies transforms, encodes to lightweight WebP.
PNG WebP Compresses heavy PNG to WebP with up to 85% bandwidth reduction.
WebP WebP No transform → direct stream. If resized → re-encoded to target dimensions.
Scenario 07

Rotation, Grayscale & Creative Filters

Comprehensive image transformation capabilities with loss-free rotation:

# Quality tuning (1 to 100, default 85):
GET /object.gcom/photo-jpg.webp?q=92   # High quality photography
GET /object.gcom/photo-jpg.webp?q=60   # Mobile lightweight preview

# Lossless Pixel Rotation & Mirror Flipping:
GET /object.gcom/photo-jpg.webp?rotate=90   # Rotate 90 degrees (100% exact colors)
GET /object.gcom/photo-jpg.webp?flip=h      # Horizontal mirror flip
GET /object.gcom/photo-jpg.webp?flop=1      # Vertical flip

# Color & Creative Filters:
GET /object.gcom/photo-jpg.webp?grayscale=1       # Human-eye corrected black & white
GET /object.gcom/photo-jpg.webp?w=800&blur=6      # Gaussian blur (preview placeholders)
GET /object.gcom/photo-jpg.webp?w=800&sharpen=1   # Unsharp mask for high-detail graphics
Scenario 08

Multi-Tier Negative Caching & Edge Shield

Protection against quota drainage, broken links, and scanning bots:

Scenario 09

Auto-Healing Malformed Query Strings

CMS themes or social scrapers sometimes concatenate query parameters without standard ampersands (e.g. ?h=630w=450 instead of ?h=630&w=450).

# Broken URL from scraper:
GET /objects.tn/banner-webp.webp?h=630w=450

# Automatically normalized internally to:
GET /objects.tn/banner-webp.webp?h=630&w=450  → Exact 450x630 output!