If you are using Imgix, migrating to ImageKit.io is straightforward and can be done without changing your existing URLs. This guide will help you understand the steps to migrate from Imgix to ImageKit.io.
Step 1: Configure external storage
ImageKit supports all external storage that Imgix supports. That means you can easily configure existing storage in ImageKit. Refer to configure external storage and follow the integration steps based on your storage.
Step 2: Enable Imgix URL rewriter
Open URL endpoints in the dashboard, and enable "URL rewriter" in the desired URL endpoint under the "Advanced settings" tab, and select "Imgix" from the dropdown. This will parse the incoming URL transformations to the format that ImageKit understands. This allows you to keep the existing Imgix transformations in your application and still use ImageKit for media optimization, transformation, and delivery.
Step 3: Test and make the switch
Now, you should be able to access existing assets through ImageKit. At the same time, existing Imgix transformations should work without any changes.
Let's fetch an image without any transformation. The same would work for other file types as well.
- Original image through Imgix (old URL)
https://example.imgix.net/rest-of-the-path.jpg - The same image using ImageKit.io URL endpoint
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg
Let's see if transformations work as expected. The same would work for videos as well.
- Imgix transformation (old URL)
https://example.imgix.net/rest-of-the-path.jpg?w=100 - With ImageKit
https://ik.imagekit.io/your_imagekit_id/rest-of-the-path.jpg?w=100
Refer to the Imgix URL rewriter specification for a list of supported transformations and how they are translated.
Once you are confident that ImageKit is serving your assets correctly, you can either:
- If you use a custom domain on Imgix, then read more about setting up a custom domain on ImageKit for media delivery.
- Otherwise, replace the imgix domain
example.imgix.net
in your URLs withik.imagekit.io/your_imagekit_id
.
Imgix URL rewriter specification
Imgix transformation | Example translation | Remarks |
---|---|---|
width | w=100 → w-100 | |
height | h=100 → h-100 | |
aspect ratio |
| Aspect ratio will only work when we provide either width or height (not both) and fit |
crop |
| Supported values:
|
fit |
| Supported values:
|
fill | Supported values:
| |
format |
| Supported values:
|
quality | q=60 → q-60 | |
orient | Supported values:
| |
fill-color |
| Color values are case-insensitive |
bg |
| Color values are case-insensitive |
dpr | dpr=3.0 → dpr-3.0 | |
sharp |
| The final result produced by ImageKit could differ from the result obtained from Imgix. |
con |
| The final result produced by ImageKit could differ from the result obtained from Imgix. |
usm | usm=40 → e-usm-2.5-8.00-1-0.05 | The final result produced by ImageKit could differ from the result obtained from Imgix. |
usmrad |
| usmrad only works in conjunction with usm The final result produced by ImageKit could differ from the result obtained from Imgix. |
blur |
| The final result produced by ImageKit could differ from the result obtained from Imgix. |
trim |
| The final result produced by ImageKit could differ from the result obtained from Imgix. |