What Is Image Resizing?
PageRoost includes an image resizing feature to help save you time by automatically resizing and optimizing images for the web. On demand, PageRoost will resize any image and serve up a web friendly version.
How Do I Use Image Resizing?
There are a couple of ways you can use image resizing. The first, and easiest, is in a rich text area. Just grab the image by one of the handles and resize it! That's it. Once you resize the image, PageRoost will update the path and generate a resized version. The original image is not modified in any way. Alternatively, when adding an image, set the desired dimensions in the "width" and "height" fields and PageRoost will update the path and generate a resized version.
Resizing Images With The Query String
Another way you can use image resizing is by appending some query string parameters to the URL of the image. For example, if you had an image called "at-the-beach.jpg", you could generate a resized version by going to the url "
/files/download/at-the-beach.jpg?w=500&h=0". Let's break down that URL and explain what's happening.
/files/download/at-the-beach.jpg- This is the path to the image being resized
?- This just separates the filename and the query string parameters (which are separated by "&")
w=500- This is telling PageRoost to resize the image to 500 pixels wide
h=0- This tells PageRoost to automatically determine the height of the image based on the new width. If a size was specified (
h=200) the image will not be resized in a way that would distort the image. PageRoost will scale the image and attempt to match the requested dimensions as closely as possible.