URL Translation Worker
Switching platforms can seem overwhelming but PixelBin makes the process hassle-free and quick. PixelBin provides a URL Translation feature that allows you to make use of the URLs from your earlier platform with minimal changes. For example, if you are migrating from ImageKit, Cloudinary or any other platform, PixelBin can translate all the incoming requests to PixelBin's syntax:
https://cdn.pixelbin.io/<file_version>/cloud_name>/<slug>/wrkr/rest-of-the-path.jpeg
How to use URL Translation Worker
URL Translation feature is available in the Zones tab under Worker.
To make use of this feature you will need to perform these two steps:
Step 1: Enable URL Translation Worker
Switch on the USE URL TRANSLATION WORKER toggle button. Click Save if you do not wish to predefine any transformations at this point.
Adding Predefined Transformations
When you enable USE URL TRANSLATION WORKER you have the option to update the Translation Function with transformation parameters for the delivered image. Adding image transformations at this stage can be helpful for those migrating from different services. You can make use of all PixelBin URL transformation parameters.
Here are a few examples:
- default
- Resize
- Remove Background
function translate(oldPath){
return oldPath;
}
function translate(oldPath){
return "t.resize(h:400,w:300)/" + oldPath;
}
function translate(oldPath){
return "erase.bg()/" + oldPath;
}
Step 2: Modify Old URL
Next, the static part of your old URL has to be replaced with the PixelBin syntax.
For example,https://res.cloudinary.com/<cloudinary_cloud_name>/image/upload/
must be replaced by you to https://cdn.pixelbin.io/<file_version>/cloud_name>/<slug>/wrkr/rest-of-the-path.jpeg
We make this straightforward by providing your syntax in the URL Translation Worker section.
To replace the old prefix, copy-paste the given URL syntax and add the file path.