Search Documentation

txt Text String

The text string to overlay on the image. This value must be supplied for text to be rendered—all other text parameters are ignored if it isn’t set.

imgix has full support for UTF-8 characters, and will appropriately render non-Latin character sets and emoji. This means that you can easily pipe in localized text to a base image instead of creating a different master image for each language you want to support.

The txt parameter has the following defaults if none of the other text parameters are set:

  • Position: Lower right corner
  • Font: Helvetica
  • Size: 12px
  • Color: #000 (Opaque Black)
  • Padding: 10px
txt=Hello World!
Clouds
txt=HELLO WORLD!&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont=Futura Condensed Medium
Clouds
txt=你好&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont=Futura Condensed Medium
Clouds
txt=😑💩❤️️&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont=Futura Condensed Medium
Clouds

Using Base64 encoding

Prefer Base64 Variant

imgix recommends using the Base64 variant version of this parameter to make encoding values easier.

Using Base64 encoding can help ensure you don’t run into issues when encoding text into URLs. This is especially important when doing more complex image compositions, where you pass collections of text parameters to the ~text endpoint.

txt64=SGVsbG8gV29ybGQh
Clouds
txt64=SEVMTE8gV09STEQh&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont64=RnV0dXJhIENvbmRlbnNlZCBNZWRpdW0
Clouds
txt64=5L2g5aW9&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont64=RnV0dXJhIENvbmRlbnNlZCBNZWRpdW0
Clouds
txt64=8J-YkfCfkqninaTvuI_vuI8&txtsize=62&txtclr=ff2e4357&txtalign=middle,center&txtfont64=RnV0dXJhIENvbmRlbnNlZCBNZWRpdW0
Clouds