Skip to main content

Image transformations

Log in to add to favourites

Properties

NameTypeDescription
sizeobjectThe image height and width resize transformations
flipstringThe orientation flip name to apply
rotateintegerThe image rotation in degrees
cropobjectThe image crop details specifying width and height, and x and y coordinates
qualityintegerThe quality in percentage

Example

JSON
{
  "poster": {
    "asset": {
      "sys": {
        "id": "fab3fdc6-89fd-4efa-bfe0-30722fb87661",
        "dataFormat": "asset"
      }
    },
    "caption": "Interstellar Movie Poster",
    "transformations": {  
        "size": {  
            "height": 100,
            "width": 100
        },
        "flip": "h",
        "rotate": 95,
        "crop": {  
            "width": 100,
            "height": 100,
            "x": 10,
            "y": 20
        },
        "quality": 95
    }
}
JSON
{
  "poster": {
    "asset": {
      "sys": {
        "id": "fab3fdc6-89fd-4efa-bfe0-30722fb87661",
        "dataFormat": "asset",
        "contentTypeId": "image"
      }
    },
    "caption": "Interstellar Movie Poster",
    "transformations": {  
        "size": {  
            "height": 100,
            "width": 100
        },
        "flip": "h",
        "rotate": 95,
        "crop": {  
            "width": 100,
            "height": 100,
            "x": 10,
            "y": 20
        },
        "quality": 95
    }
}
JSON
{
  "poster": {
    "asset": {
      "sys": {
        "id": "fab3fdc6-89fd-4efa-bfe0-30722fb87661",
        "dataFormat": "asset"
      }
    },
    "caption": "Interstellar Movie Poster",
    "transformations": {  
        "size": {  
            "height": 100,
            "width": 100
        },
        "flip": "h",
        "rotate": 95,
        "crop": {  
            "width": 100,
            "height": 100,
            "x": 10,
            "y": 20
        },
        "quality": 95
    }
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request