The dotCMS 1.9 series introduced the online image editor - a great tool for content editors to manipulate uploaded images. But almost important is that underlying the image editor is a RESTful interface for manipulating images stored in dotCMS. All functions in the image editor can be called via a cacheable URL, which is very helpful and important to web developers looking to automatically resize or edit images for use in your web sites and widgets.
The way it works is the image passes through a series of filters, each of which can take 0 or more parameters. The resultant modifed image is then passed through the next filter for processing. In the example below, we take the same image and pass it through a number of filters, each of which process the image.
Important to note : the resultant image is generated once and then cached on the dotCMS server for performance.
Below are some examples of filters that can be applied. The first example is the RAW source image, which is a JPEG. The second shows the image resized to 300px wide, though the resized image has been transformed into a PNG. The third image shows the resized image, though this time the image is being exported as a JPEG, with quality of 75%. The fourth image show the same image, resized and saturation decreased by 75%, exported as a JPEG.
Click here for the entire documentation for this API.
https://demo.dotcms.com/contentAsset/image/1432d672-a564-41c1-9ff9-b7e51e646b84/fileAsset/byInode/1
https://demo.dotcms.com/contentAsset/image/1432d672-a564-41c1-9ff9-b7e51e646b84/fileAsset/byInode/1/filter/Resize/resize_w/300
https://demo.dotcms.com/contentAsset/image/1432d672-a564-41c1-9ff9-b7e51e646b84/fileAsset/byInode/1/filter/Resize,Jpeg/resize_w/300/jpeg_q/75
https://demo.dotcms.com/contentAsset/image/1432d672-a564-41c1-9ff9-b7e51e646b84/fileAsset/byInode/1/filter/Resize,Hsb,Jpeg/resize_w/300/hsb_h/0.00/hsb_s/-0.75/hsb_b/0.00/jpeg_q/75
See Above