External Storage
External Storage allows you to use the capabilities of PixelBin such as file delivery and real-time transformation without uploading any asset to the PixelBin Storage. This is particularly useful if you have an existing infrastructure with a huge resource.
Step 1: Configure the datasource
First, setup a datasource which will point to your pre-existing data origin. By default, a datasource pointing to the PixelBin Storage
is already available.
PixelBin supports the following types of datasource:
- AWS S3
- Azure Blob Storage
- Dropbox
- Firebase Storage
- FTP
- Google Cloud Storage
- Google Drive
- PixelBin Storage (default)
- URL
- CEPH
Click here to learn more about datasources.
Step 2: Create a zone and connect to the configured datasource
Next, we setup a zone to connect the previously created datasource. After you connect the datasource to your zone, all the assets in that datasource will be made accessible through the Zone URL.
By default, a zone is already available for each organization. Each zone has a unique slug identifier expect for the default zone.
Click here to learn more about zones.
Step 3: Transform image using the Zone URL
Once the datasource is connected to your Zone, the asset could be accessed using the PixelBin URL endpoint:
https://cdn.pixelbin.io/<CLOUDNAME>/<ZONE_SLUG>/<PATTERN>/<IMAGE_PATH.EXT>
When you request using the above URL endpoint, PixelBin uses the credentials provided by you to fetch the asset from the path IMAGE_PATH.EXT
in your datasource.
Let's look at an example:
Original Image URL
https://images.unsplash.com/photo-1657781116835-7a2ec3cd8a92
Using Zone URL
- Cloudname:
dummy-cloudname
- Slug:
splash
Original Image
- Pattern:
original
https://cdn.pixelbin.io/v2/dummy-cloudname/splash/original/photo-1657781116835-7a2ec3cd8a92
- Pattern:
Image resized to 500*500 in real-time
- Pattern:
t.resize(h:500,w:500)
https://cdn.pixelbin.io/v2/dummy-cloudname/splash/t.resize(h:500,w:500)/photo-1657781116835-7a2ec3cd8a92
- Pattern:
See how to access and transform your assets using the Zone URL.
You can learn more about the URL-parameters in the Image Transformation