Resizing and cropping images with URLs
How delivery URLs work, and how to resize, crop and convert an image just by editing its URL.
Every image in PixViro has a delivery URL. To get a different version of it, you add a short list of parameters to that URL. Nothing is edited or re-uploaded: PixViro creates the version on the first request and caches it on the CDN.
For example, c_fill,w_800,h_600,f_auto placed before the public ID gives you an 800×600 crop in the best format for each browser:
…/c_fill,w_800,h_600,f_auto/products/red-shoe
The most useful parameters
| Parameter | What it does |
|---|---|
w_800, h_600 |
Width and height in pixels |
c_fit |
Fit inside the size, keep proportions (the default; never enlarges) |
c_fill |
Fill the exact size, cropping the edges |
c_pad |
Fit inside, then pad to the exact size |
f_auto |
Best format for each browser (see Automatic format) |
q_auto |
Automatic quality (the default) |
t_name |
Apply a saved preset |
There are also rotation, flipping and effects such as grayscale, blur and sharpen. The full list, with an interactive playground, is in Transformations.
Build URLs without typing
Click an image in the Media library: the Delivery URL panel builds the URL for you from a width, height, crop mode and format. Responsive HTML gives you an image tag with srcset that serves the right size for each screen (Responsive images).
Good to know
- Each new combination of parameters counts once as a transformation toward your credits; serving it again from the cache doesn't.
- Invalid parameters return an error instead of a guessed result.
- The maximum output size depends on your plan.