Crop an image

Cropping is an efficient way to eliminate distractions and remove extra background from images. Use the Crop transformation to choose the dimensions of your new image and the area you wish to preserve.

Example of the impact on images

Here's an example of an image before and after it was cropped.

Original image:

image before crop

With cropping applied:

image after crop

📘

Before you begin, you should know the URL of the image you are adding the watermark to, for example:

https://www.travelanywhere.com/Place_Archive/0502/citysun.jpg

How to

  1. Log in to ​Akamai Control Center​, then go to > CDN > Image and Video Manager.

  2. Select the correct Contract from the list.

  3. Create a new policy:

    • Click +Create, then click Policy on the menu that appears.
    • Select the policy set to which you wish to add the new policy.
    • Give your new policy a name, for example, "crop".
    • Click Create.

    The Image Policy Editor opens.

  4. Click + to open the list of Transformations.

  5. Click Crop.

  6. To adjust the size of your crop:

    • Use fixed values (pixels)
    • Set Width to 600 and Height to 300
  7. To select the crop area:

    • Select the Gravity, which is the anchor point for the crop (North, South, East, West, and so on)
    • Change the horizontal and vertical offsets from the anchor point

    For example, if the gravity is set to "Center", the horizontal offset set to 20, and the vertical offset set to 10, the center of the crop box will be 20 pixels to the right of the left edge and 10 pixels up from the bottom edge. If the crop box falls partially outside of the borders of the original image and you have set Allow Expansion to Yes the borders of the original image will be extended to the edges of the crop box.

    👍

    As you make your changes, you can preview them by clicking on the refresh arrow above the preview pane.

  8. When you are satisfied with your crop, click Save and Test on Staging.

  9. Apply the impolicy query string parameter to the end of an image URL as follows:

https://www.travelanywhere.com/Placet_Archive/0502/citysun.jpg?impolicy=crop