The Fetch alias type is used when your image assets are publicly available on the internet. When setting it up, you specify the domain where the service can go grab your images. You can optionally specify any top-level folder structure that your images follow.
Some scenarios on how to achieve this are:
http://my-serverdomain/my-images/image1.jpg
With this type of alias, the ixmage service will request the image thru the http or https protocol from the source you specify, and will optimize and transform it to fit your use-cases.
Let’s say that you own a server that is exposed publicly on the internet, and you have put some folders there where your images reside. Now you can access your images by visiting an uri address like:
http://127.555.66.777/images/ecommerce/category1/sku000001.jpg
Let’s set up the following alias:
Property | Value | Description |
---|---|---|
name | my-images | alias name |
type | Fetch | The alias type |
url | http://127.555.66.777 |
the domain (source) of the images for this alias |
Let’s say that your account token is TtAaCcOoSs
Now you can access the image as
https://cdn.ixmage.com/v2/
TtAaCcOoSs/
my-images/images/ecommerce/category1/sku000001.jpg
Behind the scenes, ixmage will resolve your my-images alias to http://127.555.66.777
and append images/ecommerce/category1/sku000001.jpg
(the rest of the request uri as explained here) to grab your image.
Now let’s work with the alias configuration a bit. If we change the settings to
Property | Value | Description |
---|---|---|
name | my-images | alias name |
type | Fetch | The alias type |
url | http://127.555.66.777/images/ecommerce |
the source of the images for this alias |
Then we can use this url to access the image:
https://cdn.ixmage.com/v2/
TtAaCcOoSs/
my-images/category1/sku000001.jpg
The domain along with the 2 initial folders are hidden away behind the alias name.
The minimum/required fields to create an alias
of type Fetch are:
Field | Description |
---|---|
Name | The name of the alias to be used when building your URL |
Type | Fetch |
url | The domain and initial folder that this alias will be pointing to. |
Locked | This flag will make the alias require a key parameter to allow requests. More info here. |
The following fields will enable other behaviors:
Field | Required | Description |
---|---|---|
Templates | No | Template definitions will make your work easier. More info here. |
Watermark | No | Watermark all images within the alias . More info here. |
Referers | No | Adding domains to this list will make the alias only access requests from this white-list. More info here. |
Secrets | No | Alias-specific secrets that can be used to open the alais when locked. More info here. |
More information about aliases
here.