This function creates thumbnails from images. The function saves the new thumbnail images in a thumbnails subdirectory inside the original directory. The system prepends thumbnail filenames with tn_
(for example, tn_picture.jpg
).
Important:
When you disable the WebServer role, the system disables this function.
uapi --output=jsonpretty \ --user=username \ ImageManager \ create_thumbnails \ dir='images' \ width_percentage='25' \ height_percentage='25'
{- "apiversion": 3,
- "func": "create_thumbnails",
- "module": "ImageManager",
- "result": {
- "data": [
- {
- "failed": 1,
- "file": "/home/cptest1/public_html/images/610_290.jpg",
- "reason": "too many pixels",
- "thumbnail_file": "/home/cptest1/public_html/images/thumbnails/tn_610_290.jpg"
}
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}