Image resizing and optimisation API

Resize and optimise images with a URL.

Upload one original and ask for the size, crop, format and quality you need in the image URL. Fileboy makes each version the first time it is asked for, then caches it.

One URL, many images

  • Resizeresize:300x_
  • CropsmartCrop:300x300
  • Formatformat:auto
  • Watermarktext or logo

The original, changed by its URL

Each picture below is the same demo photo, served by Fileboy with the transform under it. Nothing is edited by hand, and you upload the original only once.

The demo photo with resized applied

Resized

A width, and the height follows.

?transform=resize:300x_
The demo photo with smart crop applied

Smart crop

A square around the part with the most detail.

?transform=smartCrop:300x300
The demo photo with round avatar applied

Round avatar

Cropped, then rounded to a circle.

?transform=smartCrop:300x300;radius:max
The demo photo with text watermark applied

Text watermark

A credit drawn into the image.

?transform=resize:300x_;text:%C2%A9%20Fileboy~size:8pc~color:white~background:hex(00000080)~padding:6~position:bottom-left~x:8~y:8

Change the URL, see the image

Move the sliders and the transform in the URL changes with them. The image underneath is fetched from Fileboy as you go.

Loading the playground…

What you can do with an image

Resize, crop and reshape

Width, height, fit, aspect ratio, crop, rotate, flip, padding, borders and rounded corners, all in the image URL. Chain up to 20 steps with ; and they run in order. See every transform.

WebP and AVIF

format:auto serves AVIF, then WebP, then the original format, whichever the browser says it accepts. In our tests, photos came out about 30% smaller as AVIF than as WebP at the same visual quality. Images over 16 megapixels are sent as WebP instead of AVIF.

Smart crop

Crop to the part of the image with the most detail, colour and skin tone instead of the centre. Add ~focus:faces for avatars and Fileboy keeps faces whole. It never recognises or identifies anyone.

Watermarks

Draw text or a logo from your own app on top, in a corner or tiled across the image, with opacity and rotation. The original stays clean. Read the watermark guide.

Colour palettes

Fileboy works out the main colours of every image you upload. Ask for them as JSON or CSS with the palette transform, for placeholders and themes. Colour palettes

Named presets

Save a chain under a name and use preset:thumbnail in your URLs. Change the preset and every image that uses it changes, and your URLs stay short. Transform presets

Responsive images

The React Image component builds a srcset with one URL for each width, so phones download small images. Pair it with format:auto.

Made once, then cached

Each transform of an image is made the first time it is asked for and kept, so repeat requests are served from the cache. Up to 200 versions are kept for each image, and the kept versions count toward your storage.

Private images

Sign a URL, or use an expiring link, so only the people you choose can read an image. Signed URLs

AI edits (AI add-on)

Remove the background from an image or upscale it, from the API. These send the image to OpenAI and need the AI add-on, which is on paid plans. AI image edits

Use it from a tag, React or your server

A transform is just part of a URL, so an <img> tag is enough. The libraries build the URL for you, for React, Vue, Svelte, Next.js, Node.js, Ruby, Python and PHP.

Not sure how to start? Follow the resize guide or see the libraries.

<img
  alt="Our harbour"
  src="https://api.fileboy.io/images/get/FILE_ID?transform=smartCrop:400x400;format:auto;quality:75"
/>

A good fit for

  • Thumbnails, avatars and galleries of images people upload
  • Responsive images for a site you do not want to rebuild
  • Product photos in several sizes and formats from one original
  • Images that need your logo or a credit on them

Good to know

  • JPEG, PNG, WebP, BMP, TIFF and HEIC can be transformed (a HEIC comes back as a JPEG unless you ask for another format). GIF, SVG and other files are served as they are.
  • Sources larger than about 67 megapixels cannot be transformed.
  • New versions are limited to 120 a minute from one client address for each app, and versions already made are still served. Signed URLs and your private key are not limited.

See pricing for storage and transfer on each plan.

Resize your first image free

Create an app, upload an image and ask for any size or format in its URL. The free plan needs no card.