Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • 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
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • Github
  • Youtube
  • Discord
  • X

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.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Image Delivery API
  4. Resize Images

Resize Images

markdownView as Markdown

Resize image width

GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={width_value}
Additional Notes
  1. In case the dimensions specified for the output image is greater than the dimensions of the input image, the image will be upscaled.
  2. To disable upscaling, use the disable=upscale parameter.
  3. To specify a width more than 100% of the original image, use the p parameter. For example, to get a width of 250%, use width=250p.

    Note Check out the limitations that are applicable here.

    The width parameter lets you dynamically resize the width of the output image by specifying pixels or percentage values. To specify pixel width, use any positive integer between 1 and 8192. For percentage width, use any value between 0.0 and 0.99. To get image width of more than 99 percent, use a value above 99 and append a p parameter to the value. For example, for image width of 300 percent, use width=300p.

    The width parameter will automatically adjust the height of the image using the aspect ratio of the image. If the height parameter is specified, the given value will be used. And if both the height and the width parameters are not specified, the dimensions of the input image will be used.

    In case the dimensions specified for the output image is greater than the dimensions of the input image, the image will be upscaled. You can disable upscaling of the image by using the disable=upscale parameter.

    Click to enlarge

    Note Currently, the width parameter doesn't work for GIF files as it affects their quality.

    Resize image height

    GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&height={height_value}
    Additional Notes
    1. In case the dimensions specified for the output image is greater than the dimensions of the input image, the image will be upscaled.
    2. To disable upscaling, use the disable=upscale parameter.
    3. To specify a height of more than 100% of the original image, use the p parameter. For example, to get a height of 250%, use height=250p.

      Note Check out the limitations that are applicable here.

      The height parameter lets you dynamically resize the height of the output image by specifying pixels or percentage values. To specify pixel height, use any positive integer between 1 and 8192. For percentage height, use any value between 0.0 and 0.99. To get image height of more than 99 percent, use a value above 99 and append a p parameter to the value. For example, for image height of 300 percent, use height=300p.

      The height parameter will automatically adjust the width of the image using the aspect ratio of the image. If the width parameter is specified, the given value will be used. And if both the height and the width parameters are not specified, the dimensions of the input image will be used.

      In case the dimensions specified for the output image is greater than the dimensions of the input image, the image will be upscaled. You can disable upscaling of the image by using the disable=upscale parameter.

      Note Currently, the height parameter doesn't work for GIF files as it affects their quality.

      Disable upscaling of image

      GEThttps://images.contentstack.io/v3/assets/{stack_api_key}/{asset_uid}/{file_uid}/filename.jpg?environment={environment_name}&width={value}&disable={value}

      To see this parameter in action, the height or width (or both) parameter should be used with it.

      Note Check out the limitations that are applicable here.

      The disable parameter disables the functionality that is enabled by default. For instance, upscale is always enabled, in which the image is upscaled if the output image (by specifying the width or height) is bigger than the source image. To disable this feature, you can use the query ?disable=upscale. This ensures that even if the specified height or width is much bigger than the actual image, it will not be rendered disproportionately. 

      As of now, there is only one value, i.e., upscale, that you can use with the disable parameter.

      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:

      100
      environmentrequiredstring

      Enter the environment scoped to your delivery token.

      Example:

      production
      Hide Parameters

      Query Parameters

      heightoptionalstring

      Enter the value of the image height in pixels or percentage. Example 100 or 0.90 or 250p

      Example:

      100
      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:

      650
      disableoptionalstring

      Enter the name of the functionality that you want to disable. 

      Example:

      upscale
      environmentrequiredstring

      Enter the environment scoped to your delivery token.

      Example:

      production