Rewriting this function to use `promises` instead of `async: false`
I don't know Parse() myself, but this should show you the general idea for using promises with jQuery Ajax:

function accountCreation(){
    var user = Parse.User.current(); // get the currently logged in user object

    // loop through each image element
    var promises = $('.images').map(function(index, element) {
        var src = $(element).attr('src');
        return $.ajax({
            type: "POST",
            url: "encodeImgToBase64.php", // you may need to adjust this path depending on where you store the file in relation to this file
            data: 'url='+src,
        });
    });
    $.when.apply($, promises).then(function() {
        // arguments[0][0] is first result
        // arguments[1][0] is second result and so on
        for (var i = 0; i &lt; arguments.length; i++) {
            var file = new Parse.File("photo.jpg", { base64: arguments[i][0] }); // this part actually saves the image file to parse
            user.set("image" + i, file); // set this image to the corosponding column on our object 
        }
        // save the user object
        user.save(null,{
          success: function(user) { 
              // do success stuff...
          },
          error: function(user, error) {
              // do fail stuff...
          }
        });
    });
 }


Here's a description of how the code works:

$('.images').map() cycles through all the images, calling a custom function for each item.  The return value from the custom callback is added to an array and the final result of the .map() call is an array of all the returned values.

return $.ajax() returns from the .map() callback, the promise that $.ajax() returns.  So, when the .map() is done, it will have an array of ajax promises.

$.when.apply($, promises) passes the array of promises to $.when() which then waits until all the promises are resolved (e.g. all the ajax calls have completed) before calling the .then() handler.

In the .then() handler, the results of all the ajax calls are passed as arguments.  Each argument is an array of length three.  [0] in each array is the returned data from the ajax call.  [1] is the status from the ajax call, [2] is the jqXHR object from the ajax call.  In this case, you just need [0] because we already know the status.

So, then .then() handler cycles through all the arguments object passed to the .then() handler with one array passed as an argument for each ajax call that was executed and the [0] in each of those arrays is the ajax result.

Then, after processing all the ajax results, user.save() is called.



FYI, when looking at the Parse documentation, user.save() looks like it also returns a promise and new Parse.File() looks like it has a .save() method (not sure if that needs to be called).