Automatic image resizing


Image resizing on the client doesn’t always produce good quality images.  E.g. previews or photo thumbs may need to be resized on the fly to fit the page layout. Appending the required image size to the file name instructs ZetaPrints dynamic image generator to serve the requested image in the specified dimensions.

Call example

Original image URL:

Original image size: 399px x 399px

Resized image URL:

Resized image size: 200px x 200px

Call format

http://[domain name]/preview/[image name part before file extension]_[width in px]x[height in px].jpg

Width: values between 0 and 500 in 50px increments.

Height: values between 0 and 500 in 50px increments.

Width and height define the bounding box the image should fit in. All resizing is proportional to its original dimensions.

Zero width or zero height indicate that the dimension is not important. E.g. you need to fit an image into a 100px-high cell, but do not care how wide it will be: [file name]_0x100.jpg

The original file may have gif, jpeg or png extension and have transparency.  The resized images are always in jpg format.

Image resizing applies only to /preview/ and /photothumbs/ folders.

Image resizing examples

Original image

Original image

Resized in the browser

Resized in the browser

Resized on the server

Resized on the server

See also: