Welcome to Imglabs.io!

Imglabs.io is a powerful image proxy service that utilizes edge computing to decrease the latency of serving images to users all around the globe.

Getting started

  1. Create an account (it's free)
  2. Open your dashboard
  3. Copy your API key from the Account tab — it is also your Account ID
  4. Open the Domains tab and configure your Referers and Sources:
    • Referers are the domains that are allowed to use your API key
    • Sources are the domains that are allowed to be proxied
    • Wildcards are supported (example: https://*.example.com/* matches all subdomains of example.com)
  5. Make your first request (snippets below are pre-filled with your account ID)

Your first request

Everything runs through a single URL. Add operations as query parameters:

https://imglabs.io/?id=YOUR_ACCOUNT_ID&url=<encoded image url>&grayscale

Note: requests must carry a Referer header matching one of your registered referer patterns. Browsers send it automatically; use a tool like Postman or the header flag shown below when testing from the command line.

curl

curl "https://imglabs.io/?id=YOUR_ACCOUNT_ID&url=https%3A%2F%2Fwww.imglabs.io%2Fassets%2Fsamples%2Fexample_180.jpg&grayscale" \
  -H "Referer: https://your-site.example" \
  --output image.jpg

HTML

<img
  src="https://imglabs.io/?id=YOUR_ACCOUNT_ID&url=https%3A%2F%2Fwww.imglabs.io%2Fassets%2Fsamples%2Fexample_180.jpg&grayscale"
  alt="Proxied image"
/>

JavaScript

const proxyUrl = (id, imageUrl, operations) =>
  `https://imglabs.io/?id=${id}&url=${encodeURIComponent(imageUrl)}${operations ? "&" + operations : ""}`;

// usage
proxyUrl("YOUR_ACCOUNT_ID", "https://example.com/photo.jpg", "grayscale&resize=f,near,800,800");
Original Image
→
grayscale