Get inspired at ContentCon. Learn more and register today
Get inspired at ContentCon. Learn more and register today
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Image Delivery API
  4. Resize-filter

Resize-filter

markdownView as Markdown

Resize image by nearest

GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={width_value}&height={height_value}&resize-filter={resize-filter_value}

Note Check out the limitations that are applicable here.

Try the following query to see how the bilinear resizing filter works.

Resize image by bilinear

GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={width_value}&height={height_value}&resize-filter={resize-filter_value}

Note Check out the limitations that are applicable here.

Try the following query to see what happens to the given image when we use the bicubic resizing filter.

Resize image by bicubic

GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={width_value}&height={height_value}&resize-filter={resize-filter_value}

Note Check out the limitations that are applicable here.

Let us also try out the lanczos resizing filter to check how it upscales a given image.

Resize image by lanczos

GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={width_value}&height={height_value}&resize-filter={resize-filter_value}

Note Check out the limitations that are applicable here.

Additional Notes
  1. You can use the bicubic filter when you need to generate a smaller image with a natural sharpening effect.
  2. You can use the bilinear filter when you need to generate a larger image with a natural smoothing effect.
  3. You can use the nearest filter to provide a natural pixelation effect while resizing the number of pixels in the given image.
  4. You can use the lanczos filter when you need to generate a new image with the best quality. The default value for this filter is lanczos3.

The resize-filter parameter allows you to use the resizing filter to increase or decrease the number of pixels in a given image. This parameter resizes the given image without adding or removing any data from it.

The following values are acceptable for the resize-filter parameter:

  • nearest: Utilizes the values of the neighboring translated pixels to provide smoother and quick resizing of a given image.
  • bilinear: Utilizes a 2x2 environment of pixels on an average. This filter blends new interpolated pixels with the original image pixels to generate a larger image with more detail.
  • bicubic: Utilizes a 4x4 environment of pixels on average. This filter maintains the innermost pixels and discards all the extra details from a given image.
  • lanczos2: Enhances the ability to identify linear features and object edges of a given image. This filter uses the sinc resampling function to reconstruct the pixelation of an image and improve its quality.
  • lanczos3: Utilizes a better approximation of the sinc resampling function to generate an image with better reconstruction.

You can use the ?resize-filter={resize_filter_value} query to resize an image through the resizing filter. Let us look at some examples to understand how we can use the resize-filter parameter.

WarningIf you only specify the resize-filter parameter, the API request will simply return the original image. You need to also specify either the width or height parameter in the API request to ensure that the resize-filter parameter is not ignored.

Use the ?resize-filter=nearest query to generate an image using the nearest resizing filter.

Hide Parameters

Query Parameters

widthoptionalstring

Enter the value of the image width in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

500
heightoptionalstring

Enter the value of the image height in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

550
resize-filteroptionalstring

Enter the value for the resizing filter to be used to resize the image.

The format of the parameter is: resize-filter={resize-filter_value}

Example:

nearest
environmentrequiredstring

Enter the environment scoped to your delivery token.

Example:

production
Hide Parameters

Query Parameters

widthoptionalstring

Enter the value of the image width in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

500
heightoptionalstring

Enter the value of the image height in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

550
resize-filteroptionalstring

Enter the value for the resizing filter to be used to resize the image.

The format of the parameter is: resize-filter={resize-filter_value}

Example:

bilinear
environmentrequiredstring

Enter the environment scoped to your delivery token.

Example:

production
Hide Parameters

Query Parameters

widthoptionalstring

Enter the value of the image width in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

500
heightoptionalstring

Enter the value of the image height in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

550
resize-filteroptionalstring

Enter the value for the resizing filter to be used to resize the image.

The format of the parameter is: resize-filter={resize-filter_value}

Example:

bicubic
environmentrequiredstring

Enter the environment scoped to your delivery token.

Example:

production
Hide Parameters

Query Parameters

widthoptionalstring

Enter the value of the image width in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

500
heightoptionalstring

Enter the value of the image height in pixels or percentage. For example, 100 or 0.90 or 250p.

Example:

550
resize-filteroptionalstring

Enter the value for the resizing filter to be used to resize the image.

The format of the parameter is: resize-filter={resize-filter_value}

Example:

lanczos3
environmentrequiredstring

Enter the environment scoped to your delivery token.

Example:

production