> For the complete documentation index, see [llms.txt](https://docs.streamavatars.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.streamavatars.com/lua-scripting-api/api-reference-and-tips/classes/image/sorting.md).

# sorting

```lua
return function()
    local app = getApp();
    local ob = app.createGameObject(); --create object to attach images to
    applyImage(ob, 'welcomeImage'); --add the image titled 'welcome' to the object
    
    ob.image.anchor('center', true); 
    --anchors the image to the center of the screen...
    
    ob.image.sorting(-1000, 'background'); 
    --sets the image's layer to be on the background (behind everything)
    --with the sorting order of -1000 (behind objects greater than -1000)
end
```
