# Gimp.Image.prototype.list_layers

    function list_layers(): Array(Gimp.Layer) {
        // Gjs wrapper for gimp_image_list_layers()
    }

Returns the list of layers contained in the specified image.

This procedure returns the list of layers contained in the specified image. The order of layers is from topmost to bottommost.

Since 3.0

Returns

  The list of layers contained in the image. The returned list must be freed with g_list_free(). Layer elements belong to libgimp and must not be freed.