Image Uploads on Your Own Server vs an Image Upload API

What it takes to accept, store, resize and deliver images on your own server, what an image upload API takes over, and usage at three store sizes.

A server rack on one side and a cloud on the other, both receiving the same photo

Key takeaways

  • Uploading images to your own server means building five parts: an upload endpoint, validation, storage, resizing and format conversion, and delivery.
  • An image upload API provides all five behind one key, so the trade is engineering and hosting time against a monthly plan.
  • The meters that decide the cost on either side are the same two: gigabytes stored and gigabytes served. A 2,000-product store served about 62.8 GB a month as AVIF and 109.1 GB as JPG.
  • The cheapest plan for that store was Start at $69 a month with AVIF delivery, and the 200-product store passes the Free allowances, so it needs Start as well. The 20,000-product store fit Scale at $401.82 in its first month.
  • You can keep your own storage and still use the API for transformations, and you can move an existing library over from its URLs.

What does a self-hosted image upload pipeline include?

A self-hosted pipeline has five parts: an upload endpoint, validation, storage, resizing and format conversion, and delivery. Each part runs on your servers and is maintained by your team. The alternative is to upload images through an API, which takes over all five.

To upload an image to a server, the browser sends the file in a request, an endpoint receives it, and the server writes the bytes to disk or to object storage. The endpoint is the smallest part. The request has to get past the web server’s body limit first, as covered in 413 errors on image uploads, and the server then needs a place to keep the file and a way to serve it back.

PartWhat you buildWhat keeps runningAPI equivalent
Upload endpointA route that accepts multipart or binary bodies and sets size limitsThe web server and framework limits at every layerThe picker or the store endpoint
ValidationChecks on the real file type, size and dimensionsRules for allowed types, sizes and dimensionsPicker options and security policies
StorageA bucket or disk layout, and a naming schemeCapacity, backups and access rulesFilestack storage, or your own bucket
Resizing and formatsA resize job per size and a converter per formatThe image library, its updates and the job queueURL tasks such as resize and output
DeliveryA CDN in front of storageCache rules and the bandwidth billThe Filestack CDN
Table 1. The five parts of an image upload pipeline and what each one becomes with an API.

What does each part cost to build and run?

Each part costs engineering time to build and a bill or a maintenance load to run, and two of the parts carry a usage bill: storage and delivery. These are the two quantities that scale with a store.

The table below sizes three stores with the assumptions from the guide to what uploads, storage and bandwidth cost. Each product has 3 photos, each the 209,870-byte test photo. Each product gets 50 page views a month, 60% on product pages and 40% on category pages of 48 tiles. File sizes are the Filestack CDN measurements from October 30, 2026. Bandwidth is in decimal gigabytes.

StorePhotos storedStorageBandwidth as JPGBandwidth as AVIF
200 products6000.13 GB10.9 GB6.3 GB
2,000 products6,0001.26 GB109.1 GB62.8 GB
20,000 products60,00012.6 GB1,091.1 GB628.2 GB
Table 2. Monthly storage and bandwidth at three store sizes. The JPG column is the bandwidth of serving every image as a JPG.

On your own server, multiply the storage column by your provider’s price per gigabyte stored, and the bandwidth column by its price per gigabyte served. Add the servers that run the resize jobs. Those three lines are the infrastructure bill, and the engineering time for the parts in Table 1 sits on top of it.

What does an image upload API take over?

An image upload API takes over all five parts and bills them as four meters: uploads, transformations, storage and bandwidth. The resize and format work happens when a URL is requested, and the stored original stays unchanged. This 480 px square is generated from the stored 721 × 1118 original by the URL below it:

The straw hat photo as a 480 px square JPG
One stored original, delivered as a 480 × 480 JPG of 52,964 bytes.
https://cdn.filestackcontent.com/rotate=deg:exif/resize=width:480,height:480,fit:crop,align:center/output=format:jpg,quality:80/compress/zcjsVk1qSKWjIebIhHuc

Add or change a task in the URL and the next request returns a different size or format.

The plan each store needs, with every meter counted, is below. The month includes uploading the whole catalog, so its upload and transformation counts are the largest, and delivery is AVIF.

StoreUploadsTransformationsPlanMonth 1 cost
200 products6003,000Start$69.00
2,000 products6,00030,000Start$69.00
20,000 products60,000300,000Scale$401.82
Table 3. Cheapest plan for each store, using plan allowances and overage rates from the Filestack pricing page on November 4, 2026. The 20,000-product store uses 628.2 GB of Scale’s 400 GB of bandwidth, and the 228.2 GB over is billed at $0.10 per GB.

Served as JPG, the same stores cost $69.00, $75.82 and $448.11. That guide explains each meter and the overage rates.

When does building your own make sense?

Building your own makes sense when the files must stay on infrastructure you control, or when image handling is already a team’s main job. We would build in two cases: a compliance rule that bars third-party processing of the images, and a platform where image processing is the product.

Neither case rules out the API for part of the pipeline. Filestack stores uploads in its own S3 bucket by default, and the plans also support Amazon S3, Google Cloud Storage and Azure as storage backends, with storage aliases to use your own storage as a source for transformations (Filestack pricing).

How do you migrate to an API later?

Import each existing image from its URL, store the URL the API returns, and switch your pages to it. The loop below needs a Filestack API key in FILESTACK_API_KEY and a file old-image-urls.txt with one image URL per line. The store endpoint accepts a url field and copies the image into storage, as shown in the upload documentation:

while read -r url; do
  curl -s -X POST -d url="$url" "https://www.filestackapi.com/api/store/S3?key=$FILESTACK_API_KEY"
  echo
done < old-image-urls.txt

The loop sends one request per line of old-image-urls.txt and prints each response, which holds the new url, the size and the filename. Each file counts as one upload, and the migration also counts toward bandwidth, because it downloads each file from your server and uploads it again.

Frequently asked questions

Is it cheaper to store images on my own server?

Storage alone is a small bill at the sizes in Table 2, with 12.6 GB for the largest store. The total depends on the other parts: resizing, formats, delivery and the engineering time to build and maintain them.

Can I keep my own storage and use the API for resizing?

Yes. The plans support uploads to your own Amazon S3, Google Cloud Storage or Azure storage, and storage aliases let transformations read files from your own storage.

How long does it take to switch?

The time depends on the number of images, because the import is one request per image from a URL. Once each image has its new URL, pages switch by replacing the old path with the returned one.

Sources

  1. Filestack, Pricing and plans, checked November 4, 2026.
  2. Filestack, Upload documentation.
  3. File sizes: Filestack CDN measurements of one 209,870-byte photo, October 30, 2026.
  4. Store sizes, usage and plan costs: our calculation from the assumptions stated above.
Written by

Carl Cruz