For loop in javascript (using .then, .catch and return) only goes trough once : I am creating a discord bot, but i am still very new. I am using the `jimp` image cropper to get an image from an url and then crop it into 5 pieces of same sizes. This is my code:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    var Discord = require('discord.js');
    var auth = require('./author.json');
    var https = require('https');
    var fs = require('fs');
    var Jimp = require('jimp');
    var bot = new Discord.Client({
    });
    bot.login(auth.token);
    bot.on('message', function(message, channelID, userID, user, evt) {

       

        
        if (message.content.toString().includes(bot.user.toString())) {
            message.channel.send("Use / instead")
        }
        if(message.content.toString()=="/ping"){
            message.channel.send("pong")
        }
        if(message.attachments && message.content.toString().includes("/split")){
            Jimp.read(message.attachments.array()[0].url)
            .then (image =>{
                for(var i=0;i<5;i++)
                    {
                    return image
                        .clone().crop(0,image.bitmap.height/5*i,image.bitmap.width,image.bitmap.height/5)
                        .write('./files/cropped'+i+'.png')
                        console.log(i);
                    }
                
             })
            .catch(err => {
                console.error(err);
            });
            }

            
        


        
    });


<!-- end snippet -->

The `for` loop only executes once here. If i try to remove `return` and keep only image then it properly creates 5 crops, but it gives me and error:`UnhandledPromiseRejectionWarning`.
Thank you for your help!