Create image from URL
Creates a new image from a given URL
Description
The first step to start processing images with the IMG Processing API is to create an Image Object. You can create an Image object by uploading an image file or by providing a URL to an existing image.
This endpoint allows you to create an Image object by providing a URL to an existing image. The API will download the image from the provided URL, so make sure the URL is accessible and the image is publicly available.
Allowed Origins
For security reasons, the API only accept images from the following origins:
IMG Processing Storage
Images published on IMG Processing has the following format:
https://storage.img-processing.com/*
Amazon S3
You can use either pre-signed (recommended) or publicly accessible URLs.
Amazon S3 URLs must match one of the following formats:
https://*.s3.*.amazonaws.com/*
https://*.s3.amazonaws.com/*
https://s3.amazonaws.com/*
Azure Blob Storage
You can use either pre-signed (recommended) or publicly accessible URLs.
Azure Blob Storage URLs must match the following format:
https://*.blob.core.windows.net/*
Cloudflare R2
You can use either pre-signed (recommended) or publicly accessible URLs.
Cloudflare R2 URLs must match the following format:
https://*.r2.dev/*
Dropbox
You can use publicly accessible URLs.
Dropbox URLs must must match the following format:
https://www.dropbox.com/*
Google Cloud Storage
You can use either pre-signed (recommended) or publicly accessible URLs.
Google Cloud Storage URLs must match the following format:
https://storage.googleapis.com/*
Google Drive
You can use publicly accessible URLs.
Google Drive URLs must must match the following format:
https://drive.google.com/*
OneDrive
You can use publicly accessible URLs.
OneDrive URLs must must match the following format:
https://1drv.ms/*
Request Body
The request body should contain a JSON object with the following fields:
The name of the image to identify it on the dashboard.
The URL of the image to download. It must point to a supported image format (jpeg
, png
, webp
).
Response
The API will return the created Image object in the response body.
The unique identifier of the image. This identifier is used to reference the image in subsequent requests.
The name of the image. This name is provided when uploading the image and is the way the image is identified in your account. It is not unique, in fact, each transformation you make to an image will create a new image with the same name.
The public URL of the image. By default, this URL is not available and will be null
.
You can make the image public by using the publish endpoint.
Once the image is public, the URL will be updated with the public URL.
The width of the image in pixels.
The height of the image in pixels.
The format of the image. The format can be one of the following: jpeg
, png
, webp
.
The estimated size of the image in bytes. The size is an estimate and may not be exact since images can be compressed or optimized depending on the format and quality settings used during processing.
The date and time when the image was created. The date and time are in ISO 8601 format.