JSON APIs for web apps
Return optimized product, gallery, avatar, listing, or preview URLs to React, Vue, mobile, or admin clients.
Keep uploaded files, static assets, generated previews, and object-storage media where your FastAPI app already exposes them. Return Skymage URLs from API responses for exact dimensions, crops, WebP or AVIF output, and cached delivery.
from urllib.parse import urlencode
def skymage(src: str, **params: object) -> str:
return f"https://demo.skymage.net/v1/{src}?{urlencode(params)}"
@app.get("/products/{slug}")
async def product(slug: str):
product = await product_repo.find_by_slug(slug)
return {
"name": product.name,
"hero_url": skymage(product.hero_path, w=1280, f="avif", q=84),
}
A useful FastAPI image optimization test starts with one public endpoint, one uploaded or storage-backed image path, and a repeated response surface where right-sized variants are easy to compare.
Return optimized product, gallery, avatar, listing, or preview URLs to React, Vue, mobile, or admin clients.
Transform public S3, R2, static, or app-served uploads without queueing new derived files.
Normalize screenshots, report thumbnails, document previews, and workspace media into predictable sizes.
Use one Python helper near your serializers or response builders, then test a single listing, detail, or upload endpoint before changing broader media handling.
def card_image(path: str) -> str:
return skymage(
path,
w=520,
h=390,
fit="cover",
f="webp",
q=82,
)
return {"items": [{"image_url": card_image(item.image_path)} for item in items]}
Can Skymage transform the public upload, static, or storage URLs your FastAPI app already returns?
Can repeated API responses request exact dimensions instead of pushing originals into every client?
Can endpoints ship WebP or AVIF without adding Pillow jobs, queues, or derived-file storage?
Can one endpoint prove bytes, cache, and visual fit before a broader media pipeline change?
Send one public FastAPI-backed page or endpoint. Skymage will identify the repeated image response to test first, the URL parameters to try, and whether the current upload or static media origin fits a low-risk rollout.
Create a Skymage CDN URL, prepend it to your existing image URLs, and let the edge handle optimization, transforms, and delivery.
No credit card required. 14-day free trial.