Resizes a ColdFusion image.




Image functions

Function syntax

ImageResize(image, width, height [, interpolation, blurFactor])

See also



ColdFusion (2018 release): Introduced named parameters.

ColdFusion 8: Added this function.





Required. The ColdFusion image on which this operation is performed.


Required. New width of the ColdFusion image.If this value is blank, the width is calculated proportionately to the height.


Required. New height of the ColdFusion image.If this value is blank, the height is calculated proportionately to the width.


Optional. The interpolation method for resampling. You can specify a specific interpolation algorithm by name (for example, hamming), by image quality (for example, mediumQuality), or by performance (for example, highestPerformance). Valid values are:

  • highestQuality (default)
  • highQuality
  • mediumQuality
  • highestPerformance
  • highPerformance
  • mediumPerformance
  • nearest
  • bilinear
  • bicubic
  • bessel
  • blackman
  • hamming
  • hanning
  • hermite
  • lanczos
  • mitchell
  • quadratic
    See Interpolation algorithms in the Usage section for more information.


Optional. The blur factor used for resampling. The higher the blur factor, the more blurred the image (also, the longer it takes to resize the image). The valid range of blur factor is between 0-10.


You can use this function to enlarge an image or create a thumbnail image.To specify the height or width in pixels, enter the integer, for example, 100. To specify the height or width as a percentage, enter the percentage followed by the percent symbol, for example, 50%.To resize an image by one dimension (for example, height), specify the height and leave width value blank (""). ColdFusion calculates the width proportionally to the height.Use the ImageSetAntialiasing function to improve the quality of the rendered image.

Interpolation algorithms

Interpolation algorithms let you fine-tune how images are resampled. Each algorithm balances image quality against performance: in general, the higher the image quality, the slower the performance. Quality and performance differ based on image type and the size of the source file. The following table describes the algorithms and their named equivalents based on average test results:


Named equivalents


highestQuality (default)


Highest image quality with low performance

highQuality, mediumPerformance

mitchell, quadratic

Good image quality with slightly higher performance

mediumQuality, highPerformance

hamming, hanning, hermite

Medium quality image with medium performance


blackman, bessel

Slightly distorted image quality with high performance


nearest, bicubic, bilinear

Poor image quality with highest performance


<cfset myImage=ImageNew("")>
<cfset ImageResize(myImage,"50%","","blackman",2)>
<!--- Save the modified image to a file called "test_myImage.jpeg" and display the image in a browser. --->
<cfimage source="#myImage#" action="write" destination="test_myImage.jpeg" overwrite="yes">
<!--- Display the source image and the thumbnail image. --->
<img src=""/>
<img src="test_myImage.jpeg"/>