Image
Description of API endpoint for getting or generating an image.
Imengine is a relatively "dumb" service and will only do what you tell it to do. To generate an image you need to provide
a crop function.
Each origin and function has it's own set of parameters described below.
These parameters are optional and general for all API, to control the output format:
Parameter
Accepted values
Default
Description
format
string
jpg
Format of the resulting image. (jpg, png)
q
percent
60
The quality of the resulting image (1-100)
Source of origin
Image from Open Content
GET
https://imengine.example.com/?uuid={uuid}&type=preview&...
The most common source of images is Open Content. The parameter for the source of image is mandatory and is represented by these options.
Query Parameters
uuid
string
Uuid of the image to query Open Content for.
source
boolean
In rare cases Imengine will have access to. the original version of the image, and can use that instead of the preview. Default=false
type
string
What Open Content image file to use as source. Default=preview
External image
GET
https://imengine.example.com/?imgsrc={imgsrc}&...
Will create, fetch, cache and use the external image.
Query Parameters
sourceformat
string
St the format of the external image. Default is jpg
imgsrc
string
Decoded url for the external image to fetch.
Functions
Imengine offers a number of functions for manipulating images. Each function comes with it's own set of parameters. Source of origin also needs to be specified on all calls.
Crop cover image
GET
https://imengine.example.com/?function=cover
Takes the original image ratio and customise the width and height to keep original ratio of the image.
Query Parameters
width
integer
Width of the resulting image.
height
integer
Height of the resulting image.
Examples:
Crop resize image
GET
https://imengine.example.com/&function=cropresize
This function is typically used together with the NewsML article document data created with Naviga Creation tools. Crops image into defined crop size from custom start position. Then scale into defined size.
Query Parameters
crop_w
number
Width of the soft crop in percent of the original image.
crop_h
number
Height of the soft crop in percentage of the original image.
width
integer
Width of the resulting image.
height
integer
Height of the resulting image.
x
number
Horisontal start position for the soft crop, as percentage of the original image from the left.
y
number
Vertical start position for the soft crop, as percentage of the original image from the top.
Examples:
Crop fit image
GET
https://imengine.example.com/?function=fit
Scale image to fit inside the limits. Add scale up to make the image cover the max size area. Can exceed limits on scale up.
Query Parameters
maxsize
integer
Height and width limit for the resulting image.
scaleup
boolean
Whether to exceed limits on the larger side.
Examples:
Hard crop image
GET
https://imengine.example.com/?function=hardcrop
Crop image into defined size, from top left.
Query Parameters
height
integer
Height of resulting image.
width
integer
Width of resulting image.
Examples:
NP crop image
GET
https://imengine.example.com/?function=np_crop
This crop function is typically used by Naviga Newspilot. Crops image into defined size from custom start position.
Query Parameters
height
integer
Height of the resulting cropped image.
width
integer
Width of the resulting cropped image.
x
integer
Horisontal start position for soft crop, as percentage of the original image from the left.
y
integer
Vertical start position for soft crop, as percentage of the original image from the top.
zoom
number
Zoom of soft crop.
Examples:
Original image
GET
https://imengine.example.com/?function=original
Just fetch the image with original size. No crop, no other parameters.
Examples:
Square crop image
GET
https://imengine.example.com/?function=square
Crop image into a square using hardcrop.
Query Parameters
width
integer
Width and height of the resulting image.
Examples:
Thumbnail crop image
GET
https://imengine.example.com/?function=thumbnail
Crop image into defined size from center position.
Query Parameters
height
integer
Height of resulting image.
width
integer
Width of resulting image.
Examples:
Last updated