Dynamic Image Resizer
The image resizer allows you to generate images of any size on the fly. You can try different widths and heights until you find a size that fits your design properly. This simplifies the process of creating different size images for various devices.
The URL
http://img.filemobile.com/i/{MEDIA_ID}/w/{WIDTH}/h/{HEIGHT}/t/{BASE_TRANSCODER_PROFILE}/f/{FILTER_TYPE}/x/{FILTER_PARAMETER}
Examples:
Make an image 400 pixels wide.
http://img.filemobile.com/i/5239658/w/400
Make an image 400 pixels high
http://img.filemobile.com/i/5239658/h/400
Make an image 200x200
http://img.filemobile.com/i/5239658/h/200/w/200
Make a grey scale version of the image, 400 pixels wide
http://img.filemobile.com/i/5239658/h/400/f/IMG_FILTER_GRAYSCALE
Make an image 400 pixels wide, and increase the brightness by 150
http://img.filemobile.com/i/5239658/w/400/f/IMG_FILTER_BRIGHTNESS/x/150
Parameters it works
| Name | Required | Description |
|---|---|---|
| i | Required | Media ID of the image to be resized |
| w | Desired Width, if h is provided and w is not, width will be calculated. | |
| h | Desired Height, if w is provided and h is not, height will be calculated. | |
| t | Base transcoder profile to use, defaults to 15. If you require images larger then default 15, you would need to create a new base image profile for the system to use, and then use that media transcoder profile id. | |
| f | Filter you would like to apply. | |
| x | Filter argument. |
Filters
- IMG_FILTER_NEGATE: Reverses all colors of the image.
- IMG_FILTER_GRAYSCALE: Converts the image into grayscale.
- IMG_FILTER_EDGEDETECT: Uses edge detection to highlight the edges in the image.
- IMG_FILTER_EMBOSS: Embosses the image.
- IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using the Gaussian method.
- IMG_FILTER_SELECTIVE_BLUR: Blurs the image.
- IMG_FILTER_MEAN_REMOVAL: Uses mean removal to achieve a "sketchy" effect.
- IMG_FILTER_BRIGHTNESS: Changes the brightness of the image. Use argument to set the level of brightness.
- IMG_FILTER_CONTRAST: Changes the contrast of the image. Use argument to set the level of contrast.
- IMG_FILTER_SMOOTH: Makes the image smoother. Use argument to set the level of smoothness.
Known Issues
Hits are not currently logged against images displayed using the resizer - this can be worked around using fm:LogHit component
CDN support not built in, img.filemobile.com can be used as an origin server though when configuring a cdn, URLs will need to be hard coded into the web templates
developer documentation r22125