Site icon Filestack Blog

The Filestack Cheat Sheet: 12 Ready-to-Use Transformation Chains

You have file handles. You need transformed images. The Processing API sits between upload and delivery, letting you resize, crop, convert, and enhance files on the fly in your file uploader.

This guide skips the theory. Instead, here are copy-paste URL patterns for the most common scenarios you’ll run into.

Key Takeaways

How URL Chaining Works

Every transformation is a task. Tasks chain together with forward slashes. They run left to right. For a deeper look at how the Processing Engine works under the hood, check the overview docs.

Basic structure:

https://cdn.filestackcontent.com/TASK1/TASK2/TASK3/HANDLE

With an external URL instead of a handle:

https://cdn.filestackcontent.com/APIKEY/TASK1/TASK2/EXTERNAL_URL

Order matters. A resize before a watermark gives different results than a watermark before a resize.

Now, the recipes.

Profile Pictures

Users upload whatever they want. You need consistent, optimized avatars. Let’s say a user uploads this picture and let’s automatically transform them using Filetack’s Processing Engine

Standard Avatar (Square, Face-Centered)

https://cdn.filestackcontent.com/crop_faces=width:200,height:200,mode:thumb/compress/HANDLE

What this does:

 

Circular Avatar with Fallback

https://cdn.filestackcontent.com/resize=width:200,height:200,fit:crop,align:faces/circle/compress/HANDLE

What this does:

High-DPI Avatar for Retina Displays

https://cdn.filestackcontent.com/crop_faces=width:400,height:400,mode:thumb/quality=value:85/auto_image/HANDLE

What this does:

If you need to give users control over their own cropping, the Transformation UI provides a drag-and-drop interface that outputs these same URL chains.

E-commerce Product Images

Product photos need to look consistent across your catalog, regardless of what sellers upload.

Product Thumbnail (White Background)

https://cdn.filestackcontent.com/resize=width:300,height:300,fit:max/rotate=deg:exif/compress/HANDLE

What this does:

Product Detail Image (Fixed Aspect Ratio)

https://cdn.filestackcontent.com/resize=width:800,height:800,fit:clip/quality=value:80/auto_image/HANDLE

What this does:

Product Zoom (High Quality, Cached)

https://cdn.filestackcontent.com/resize=width:1600,fit:max/quality=value:90/cache=expiry:31536000/HANDLE

What this does:

User-Generated Content

Forums, reviews, social feeds. Users upload unpredictable content. You need it safe and consistent.

Moderate and Resize UGC Images

https://cdn.filestackcontent.com/resize=width:1200,fit:max/blur_faces=faces:all,amount:8/compress/HANDLE

What this does:

Strip Metadata and Optimize

https://cdn.filestackcontent.com/rotate=deg:exif/no_metadata/resize=width:1000,fit:max/compress/HANDLE

What this does:

Watermark UGC Before Download

https://cdn.filestackcontent.com/resize=width:1200,fit:max/watermark=file:YOUR_WATERMARK_HANDLE,position:[bottom,right],size:15/compress/HANDLE

What this does:

add_water_mark_image

Document Processing

PDFs, Word docs, presentations. Common needs: thumbnails, previews, conversions.

PDF Page to Image Preview

https://cdn.filestackcontent.com/output=format:jpg,page:1,density:150/resize=width:600,fit:max/compress/HANDLE

What this does:

Document to Thumbnail Grid

https://cdn.filestackcontent.com/output=format:png,page:1,density:100/resize=width:200,height:280,fit:clip/HANDLE

What this does:

Get PDF Page Count (JSON Response)

https://cdn.filestackcontent.com/output=format:pdf,docinfo:true/HANDLE

Returns JSON with page count and dimensions. Useful for showing “12 pages” before the user opens the document.

Performance Optimization

Faster pages, lower bandwidth costs. Image weight is one of the biggest factors in page speed, and the image transformation API can cut load times significantly with the right chain.

Aggressive Compression Chain

https://cdn.filestackcontent.com/resize=width:800,fit:max/quality=value:75/auto_image/compress/HANDLE

What this does:

Order matters here. Run compress last.

Progressive JPEG for Large Images

https://cdn.filestackcontent.com/resize=width:1600,fit:max/pjpg=quality:80/HANDLE

What this does:

Cache Transformed Images Long-Term

https://cdn.filestackcontent.com/resize=width:400/compress/cache=expiry:max/HANDLE

What this does:

Storing Transformed Images

By default, transformations are cached for 30 days. If you want to create a new permanent handle from a transformed image:

https://cdn.filestackcontent.com/APIKEY/resize=width:400/compress/store/HANDLE

Returns JSON:

{
  "url": "https://cdn.filestackcontent.com/NEW_HANDLE",
  "filename": "image.png",
  "size": 45678,
  "type": "image/png"
}

Now NEW_HANDLE is a permanent file you can reference without reprocessing.

Handling Errors with Fallbacks

When source images are broken or transformations fail, show a placeholder instead of an error.

https://cdn.filestackcontent.com/resize=width:400/fallback=file:YOUR_PLACEHOLDER_HANDLE,cache:300/HANDLE

What this does:

Quick Reference: Task Order

For most image processing, this order works well:

  1. rotate (fix orientation first)
  2. crop or smart_crop (remove unwanted areas)
  3. resize (set final dimensions)
  4. filters (blur, sharpen, etc.)
  5. watermark (apply to final size)
  6. quality (reduce quality after all edits)
  7. auto_image or compress (format optimization last)
  8. cache or store (control delivery)

Common Mistakes to Avoid

Compressing before resizing. Resize first. Fewer pixels means better compression.

Using cache=false in production. Every request with cache=false counts against your transformation quota. Use it only for testing.

Forgetting EXIF rotation. Phone photos often have rotation metadata. Add rotate=deg:exif early in your chain.

Setting quality too low. Below 70, JPEG artifacts become visible. Start at 80 and test.

Watermarking before resize. Your watermark will get scaled. Apply it after the final resize.

What’s Next

These recipes cover the most common patterns. The Processing API has more specialized tasks for facial detection, PDF manipulation, and video transcoding.

For the full parameter reference, see the Processing API documentation.

Questions about specific transformation chains? Reach out to support@filestack.com.

Exit mobile version