Assets
Every asset in Agility is served over a CDN. Images can be resized, optimized and reformatted without having to re-upload it. You can use query strings to manipulate and generate different sizes and thumbnails of your images. This is also known as image transcoding.
There are many instances where an image will need to be displayed across multiple devices with different size restrictions. Agility allows developers to make this request directly in the code through Media Based URL Transcoding.
Let’s use this picture of a cat as an example and say you’ve uploaded it to Agility and the URL for the image is https://cdn.aglty.io/agility-cms-docs/images/cat

A Developer could use the Width and Height parameters below to alter the URL and specify that the Image needs to be displayed with a Width and Height of 200 pixels. The URL they would use is https://cdn.aglty.io/agility-cms-docs/images/cat?w=200&h=200
*Note: In Agility we always use "w" and "h" in our focal point code instead of the full words "width" and "height", which you can see outlined in the URL above.

If you have an image that needs to be cropped around a non-center focal point, you can use the image editor to choose that focal point. Then, if you provide a height (h) and width (w) parameter to that image's URL, it will center around the focal point and not the center of the image itself.
As an example, let's look at this image where the person has been offset:

If we do not choose a focal point, the default 200x200 crop of that image will look like this (https://cdn.aglty.io/agility-cms-docs/images/joel-wide.jpg?w=200&h=200):

However, once we set the focal point on the face, the default crop performs much better (https://cdn.aglty.io/agility-cms-docs/images/joel-focal.jpg?w=200&h=200):

In order to set a focal point on your image, do the following:
Navigate to your assets in Agility and click Edit on the picture you wish to use Focal Point on. Your Edit window will look similar to this:

Click "Edit" in the bottom right and you will be brought to the Image Editor pictured below.

To set your focal point, click the "Focal Point" button. You will see the button turn purple and change to "Set Point". From here, use your mouse to click on the area of the image you want the Focal Point to be. Once set you will see a crosshair icon appear on the image, denoting where you have chosen the focal point to be set.

Click "Set Point". This will lock the Focal Point crosshairs in place.

Click" Save".
Your Focal Point is now set!
Agility uses Fastly for image optimization, and supports the following additional query parameters:
There are times when images need to be used across devices with different size restrictions. Instead of creating multiple image fields for each image size, Agility provides a way for developers to request a specific image size from an image asset in their code.
Agility offers Media URL Based Transcoding which provides the ability for images that are stored in Agility Media to be transformed into thumbnails via a URL request.
To retrieve a thumbnail from your image, first upload an image to your Agility Assets Manager:
Select an Image
Get the image URL by left-clicking the image and clicking on 'Copy URL'.
Select an Image
For my example, the URL for the image is returned as: https://42b6f927-cdn.agilitycms.cloud/cat.jpg
To transform the image we have the following parameters available:
The w parameter sets the width of the image, expects a number value.
The h parameter sets the height of the image, expects a number value.
The c parameter performs an action on the image, expects one of the number values listed below:
The q parameter sets the quality of the image as a percentage of the original asset, expects a number between 1 - 100.
The format parameter enables the source image to be converted from one encoded format to another.
https://42b6f927-cdn.agilitycms.cloud/cat.jpg?w=200
https://42b6f927-cdn.agilitycms.cloud/cat.jpg?w=200&h=200
https://42b6f927-cdn.agilitycms.cloud/cat.jpg?w=200&h=200&c=2