Imgix APIsRendering APITextText Height

Text Height

txt-h

The txt-h parameter limits how tall a text block may be. It is the vertical counterpart to txt-width, and like that parameter it is measured in CSS pixels multiplied by dpr, or given as a decimal fraction of the image height.

txt-h is only read when txt-fit is set. What it does depends on which fit mode is in use:

txt-fitEffect of txt-h
maxThe block is scaled down until it fits the height
wrapLines that do not fit are cut, and the visible text ends with an ellipsis
wrapmaxThe whole wrapped paragraph is scaled down until it fits

Without a fit mode, the text is a single unconstrained line and txt-h has nothing to act on.

Wrapped with no height limit
sandbox-demo
txt-h=100 cuts the overflow and adds an ellipsis
sandbox-demo
txt-fit=wrapmax with txt-h=0.25 shrinks the paragraph instead
sandbox-demo
txt-fit=max with txt-h=60 scales a single line down
sandbox-demo

On images the parameter is spelled txt-h. The longer txt-height spelling is accepted on the Video API only.