
This will decrease the load on the graphic heavy page while maintaining its aesthetic quality. In such situations, using Libpixel’s resize API makes sense, where you can resize the same image to be presented as a thumbnail in the main menu of your site. Same goes for a blog site or any other website that heavily relies on graphic media. If you are managing an online marketplace, chances are there are tons of images on the page and many are used in multiple places but presented with different dimensions. Now let’s talk about where you can employ the image API to better optimize your website.

The above mentioned only cover some of the major functionalities of our image CDN, it supports numerous other functionalities that you can read more about in our documentation. The modern WebP format is supported by the latest browsers and supports the maximum compression of files, allowing for reduced load on the page. Having images in the right format also provides a huge boost in the SEO rating of your website. With the API, you can transform a transparent PNG image to a normal JPG image or transform either of these into the modern WebP format that google prefers.
You can easily change the format of your images depending upon the requirements by using Libpixels image API. This is especially useful when you are presenting images for devices with high DPI such as iPhones and want to provide a clearer image to such devices. This acts as a multiplier for both width and height and allows you to customize the presentation of the image depending upon the resolution of the device. You can specify the DPR of an image between 0.1 and 10.0. With Libpixel’s resize CDN, you can easily crop a portion of the image by defining four parameters, x,y origins and the width and height of the rectangular crop.ĭepending upon the type of the `mode` you have set, additional cropping may be applied. CropĪnother very useful function is the ability to crop images on the go. You can place this URL in the `src` attribute of an image tag and it will deliver an image with 300px width. Here we are defining the new width as 300px. Here’s an example URL for resizing an image if you are using the`src` tag: To crop the image to a new aspect ratio, you can override the default mode to `crop`, which will allow you to resize the image to new aspect ratios. The default mode is `fit`, which means that the image will be resized while maintaining its aspect ratio. You can resize an image while maintaining its original aspect ratio by passing the image through the API and defining its output width and height. Some main features of our resizing API include: Resize

This saves the developers from resorting to different unreliable libraries to perform image transformations and can simply use one API for all functionality. With our Image API, users can easily resize their images and transform them in numerous ways. The API is very high performant, it takes longer for the image to be communicated than for it to be processed in our data center. Using Libpixel’s resize CDN, a developer is also saved from having to save multiple instances of an image, rather they just have to store the highest resolution of the image and can transform it on the go using our API. To resolve this issue efficiently, you can use Libpixel’s resizing image API that allows you to easily resize images programmatically by declaring parameters in the `src` tag. This can be a gruelling process, especially if your website relies heavily on media. As there is no easy way to optimize images, developers have to rely on storing multiple instances of an image and then decide which instance to be presented at which device. It is easy to overlook the effect optimizing images has on site performance. On the first look, both look more or less the same, but the right one takes 4x times more to load.
