GET api.ashx/v2/ui/image.{json|xml}
Renders resized image HTML for a local or remote image URL with support for server-side resizing and different scale modes.
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
maxHeight | int | Query String | Maximum height of resulting image | Required | 100 | |
maxWidth | int | Query String | Maximum width of resulting image | Required | 100 | |
outputIsPersisted | bool | Query String | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | false | |
resizeMethod | string | Query String | Method to resize. ScaleDown scales the entire image to fit within the boundaries. ZoomAndCrop scales the image as small as possible while still filling the entire width/height boundaries and retaining aspect ratio, resulting in cropping of either the X or Y axis as necessary. | Optional | ScaleDown | ScaleDown,ZoomAndCrop |
scaleFactor | double | Query String | Scale factor to use for high-DPI output | Optional | 1 | |
url | string | Query String | Url | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.get({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/ui/image.json?maxHeight=6&maxWidth=6&url=url', data: { 'maxHeight': '6', 'maxWidth': '6', 'url': 'url' } }).then(function(response) { // use response });
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Html>html</Html> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>