Look up Image Dynamically

Dear Jennifer,
The issue with the lookup must be because you are not using ready event! This is something I’ve missed in your code, but you can see it in my reply before.

Please, make sure that you include ready event in spRendered() and it will definitely work:

fd.spRendered(function() {
    //run after lookup is READY
    fd.field('Site').ready().then(function(field) {
        //first select picture when the form opens
        pictureChange();

        //change picture on change
        fd.field('Site').$on('change', function(value) {
            pictureChange();
        });
    }); 
});

Below is what I have but the picture is still not working.
localStorage.clear();
fd.spRendered(function() {
//run after lookup is READY
fd.field('Site').ready().then(function(field) {
//first select picture when the form opens
pictureChange();

    //change picture on change
    fd.field('Site').$on('change', function(value) {
        pictureChange();
    });
}); 

});

function pictureChange(){
if(fd.field('Site').value){
var value = fd.field(‘Site’).$el.innerText.trim();
if(value == 'PRS'){
fd.control('Image0').source = 'Sign in to your account';
}
else if(value == 'PRI'){
fd.control('Image0').source = 'Sign in to your account';
}
else if(value == 'PTG'){
fd.control('Image0').source = 'Sign in to your account';
}
else if(value == 'PEC'){
fd.control('Image0').source = 'Sign in to your account';
}
else if(value == 'Parts'){
fd.control('Image0').source = 'Sign in to your account';
}
}
}

Dear Jennifer,
Picture change should also be as follows:

function pictureChange(){
    if(fd.field('Site').value){
        //get the LookupValue instead of inner text
        var value = fd.field('Site').value.LookupValue.trim();
        alert('Field Site value: ' + value);
        if(value == 'PRS'){
            alert('Image: PRS');
            fd.control('Image0').source = 'https://site.sharepoint.com/devPlay/DoorsMaps/PRS.PNG';
        } 
        else if(value == 'PRI'){
            alert('Image: PRI');
            fd.control('Image0').source = 'https://site.sharepoint.com/devPlay/DoorsMaps/PRI.PNG';
        } 
        else if(value == 'PTG'){
            alert('Image: PTG');
            fd.control('Image0').source = 'https://site.sharepoint.com/devPlay/DoorsMaps/PTG.PNG';
        } 
        else if(value == 'PEC'){
            alert('Image: PEC');
            fd.control('Image0').source = 'https://site.sharepoint.com/devPlay/DoorsMaps/PEC.PNG';
        } 
        else if(value == 'Parts'){
            alert('Image: Parts');
            fd.control('Image0').source = 'https://site.sharepoint.com/devPlay/DoorsMaps/Parts.PNG';
        }
    }
}

Thanks so much finally got this functioning!