Skip to main content

URL Translation Workers

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.

URL Translation

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 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:

 function translate(oldPath){
return 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 URL Translation Worker section.

URL Prefix

To replace the old prefix, copy-paste the given URL syntax and add the file path.