Handling and display of Sprite folder

If I take my Dropbox Folder with over 400 Images, then crashed Codea. With a folder like Planet Cute no Problem.

-- 000 spriteList
print("Please wait while the icons are loaded")
-- Use this function to perform your initial setup
function setup()
    print("Everything loaded")
    print("Number increase stress up")
    print("Number reduce stress down")
    nr=1
    spriteKeys = spriteList("Planet Cute")  
    iparameter("sprite1",1,#spriteKeys,1) 
    iparameter("sprite2",1,#spriteKeys,1) 
    iparameter("sprite3",1,#spriteKeys,1) 
    spriteImages = {}
    for i = 1,#spriteKeys do
         spriteImages[i] = readImage("Planet Cute:"..spriteKeys[i])
     end
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)

    -- This sets the line thickness
    strokeWidth(5)
    fontSize(24)
    fill(255)
    -- Do your drawing here
    sprite(spriteImages[sprite1],100,100)
    sprite(spriteImages[sprite2],100,300)
    sprite(spriteImages[sprite3],100,500)
    sprite(spriteImages[nr],WIDTH/2,300)
    text(nr..".  Planet Cute:"..spriteKeys[nr],WIDTH/2,400)
    text("Planet Cute has "..#spriteKeys.." Icons",WIDTH/2,700)
end  

--function touched(touch)
    --!if touch.state == ENDED and nr < #spriteKeys then
        --nr = nr + 1
    --end!
 --if touch.state == MOVING and nr >1  then
       -- nr = nr - 1
   -- end
--end
  
function touched(touch)
    local id = touch.id
    local state = touch.state
    local x = touch.x
    local y = touch.y
    if state == BEGAN then
        swipeId = id  -- Preserve the id
        swipeX = x    -- Preserve the position
        swipeY = y
        return
    end
    if state == ENDED and id == swipeId then
        swipeId = nil
        if math.abs(x - swipeX) < 50 then -- Within tolerance?
            if swipeY - y > 50 and nr >1 then       -- Long enough?
               nr = nr -1
            end
            if y - swipeY > 50 and nr < #spriteKeys then       -- Long enough?
                nr = nr + 1
            end
        end
    end
end

Are you loading (rendering) all the images into memory at once? That would crash because you would likely run out of memory.

You’d have to implement a dequeuing or paging mechanism. That is, off-screen images are unloaded (not rendered).

Thank you. That i want to try