Changes the texture of a Texture widget.

texture:SetTexture(file [, horizWrap, vertWrap, filterMode])


string|number - Path to a texture (usually in Interface\\) or a FileDataID.
string? - How to sample texture coordinates beyond the (0, 1) range. Applies to both horizontal and vertical wrapping.
horizWrap Description
"CLAMP" Default; extends the texture edges infinitely.
"CLAMPTOBLACK" Fills the overflow with black.
"CLAMPTOBLACKADDITIVE" Fills overflow with a transparent black.
"CLAMPTOWHITE" Fills the overflow with white.
"REPEAT" (or true) Repeats the whole texture infinitely.
"MIRROR" Repeats the whole texture infinitey, mirroring adjacent iterations.
string? - Unused argument. The horizWrap argument applies instead.
filterMode Description
"LINEAR" Default; bilinear filtering.
"TRILINEAR" Also sampling mipmaps.
"NEAREST" Nearest-neighbor filtering.


  • There is a return value; however, it is always true and has no significance.
  • Pixels outside the texture coordinate space may be sampled explicitly by Texture:SetTexCoord(), or implicitly by the tiling mechanism when the texture widget is larger than the default size of the texture file.
  • Custom images must be in BLP, JPEG, or TGA format with power-of-two dimensions (e.g. 16x16, 8x32, 256x64). TGA images may have 8bpp grayscale, 24bpp RGB, or 32 bpp RGBA; RLE is supported.
  • The client only displays image files that existed when it launched, so adding new custom textures requires a restart.
  • Textures load asynchronously. For example, texture:GetSize() returns 0,0 until texture:IsObjectLoaded() becomes true; and then it returns the native texture size.
    • See also TextureLoadingGroupMixin:IsFullyLoaded() {TextureLoadingGroupMixin:IsFullyLoaded at Townlong-YakTextureLoadingGroupMixin at GitHub}.

Patch changes

See also