EJS, Pug, or Handlebars views
Serve product cards, article heroes, profile photos, and gallery images from existing template data.
Keep product photos, CMS media, and user uploads on the origin your Express app already exposes. Let templates and API responses return Skymage URLs for exact dimensions, crops, WebP or AVIF output, and cached delivery.
const skymage = (src, params = {}) => {
const query = new URLSearchParams(params).toString();
return `https://demo.skymage.net/v1/${src}?${query}`;
};
app.get('/products/:slug', async (req, res) => {
const product = await products.findBySlug(req.params.slug);
res.render('product', {
product,
heroUrl: skymage(product.heroPath, {
w: 1280,
f: 'avif',
q: 84,
}),
});
});
A useful Express image optimization test starts with one public route, one app-served or storage-backed image path, and a repeated template or JSON surface where smaller variants are easy to measure.
Serve product cards, article heroes, profile photos, and gallery images from existing template data.
Return optimized image URLs from Express JSON APIs consumed by React, Vue, mobile apps, or storefronts.
Transform public uploads, S3-backed paths, thumbnails, avatars, and CMS media without adding image workers.
Use a small server-side helper, then test one list, detail, or upload route before moving broader Express image handling behind Skymage.
const cardImage = skymage(product.imagePath, {
w: 520,
h: 390,
fit: 'cover',
f: 'webp',
q: 82,
});
res.render('catalog', { products, cardImage });
Can Skymage transform the public uploads, static files, or storage-backed URLs Express already exposes?
Can repeated views request exact dimensions instead of serving originals into every card or hero slot?
Can routes ship WebP or AVIF without adding sharp, queues, or background image workers?
Can one route prove bytes, cache, and visual fit before a wider media pipeline change?
Send one public Express route. Skymage will identify the repeated image surface 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.