A URL pattern is any unique, customisable identifier that will appear in your image URL. A URL pattern can contain only alphabets, numbers and hyphens.


Default URL pattern (empty slash)

Your ImageKit account comes with one default or empty slash (/) URL pattern.


For example, in this image URL - https://ik.imagekit.io/demo/default-image.jpg:

  • "ik.imagekit.io" is default base URL.
  • "demo" is ImageKit ID
  • "/" is the default URL pattern
  • "default-image.jpg" is the file path



Image Origin Preference

A single URL pattern can be configured to fetch an image from multiple image origins. You con configure the order of origins in which ImageKit will try to fetch the requested image. In case of multiple origins against a single URL pattern, ImageKit attempts to retrieve the image from each of the origins sequentially. Since the media library is the default origin of images for all ImageKit accounts, it is always checked first for any image request. If a file is not found in any origin then ImageKit returns 404.


Multiple URL pattern and multiple image origin

You can create multiple URL pattern and configure them to use a single image origin.




Need help in figuring out the right setup?

URL patterns allows you to manage highly complex legacy infrastructure which involves multiple image servers, S3 buckets. If you need help in finding the right setup, get in touch. Write to us at support@imagekit.io