MV Image Width and Height returning as 0

Hey there game makers!

Here's my problem. I want have have an eval that requires an image width but it keeps returning as 0. The code is below.

JavaScript:
SceneMine.protoype.create = function() {
this._field = new Sprite();
this.addChild(this._field);
this.createListIMG();
}
SceneMine.prototype.createListIMG = function(sprite) {
this._listIMG = [];
this._listIMG[0] = new Sprite (ImageManager.loadFTM(PicA));
this._listIMG[0].x = (Graphics.boxWidth / 2) - this._listIMG[0].width;
this._listIMG[0].y = Graphics.boxHeight - this._listIMG[0].height;
this._field.addChild(this._listIMG[0]);
this._listIMG[1] = new Sprite (ImageManager.loadFTM(PicB));
this._listIMG[1].x = this._listIMG[0].x + this._listIMG[1].width;
this._listIMG[1].y = this._listIMG[0].y - this._listIMG[1].height;
this._field.addChild(this._listIMG[1]);
}
This is because the images weren't preloaded, so on first access the bitmap has no dimensions to reference.

Assign your ImageManager.loadFTM call to a variable and then call addLoadListener on it, and put your repositioning code in the listener function.
or use Galv_ImageCache, and load it from there (which I got my TitleRewardIcons
to work correctly, I would love to add my own load system for those 🙂 but it does
the trick 🙂
This is because the images weren't preloaded, so on first access the bitmap has no dimensions to reference.

Assign your ImageManager.loadFTM call to a variable and then call addLoadListener on it, and put your repositioning code in the listener function.
Can you type it out in a javascript format?
Can someone please tell me how to preload images inside my own plugin without using and extra one.
Waiting all of 6 hours in the middle of what's the working day for many people is not sufficient for a bump.

People are all volunteers here, you'll need to be patient and allow a reasonable amount of time for someone to see your thread and answer you.

I think that, given the length and complexity of the code in your first post, @Trihan assumed you would know how to write the necessary code based off of his description.
Yea, here's the official message (no worries, you're not in trouble):

@BlueDragonZ, please do not bump your topic unless it has been 24 hours later since your last post. You can review our forum rules here. Thank you.

For a load listener, you could try something like this:
JavaScript:
  var spriteA = new Sprite(ImageManager.loadFTM(PicA));
  spriteA.bitmap.addLoadListener(function(bmp) {
    this.x = (Graphics.boxWidth / 2) - bmp.width;
    this.y = Graphics.boxHeight - bmp.height;
  }.bind(spriteA));
  this._listIMG[0] = spriteA;
Implementation details can be found in your project's rpg_core.js file.
Thank you very much for your help all of you but I was able to figure out an alternative that fixed my issue on it's with the help @Trihan and @caethyril reply. So the problem is now solved.

Original thread: https://forums.rpgmakerweb.com/threads/image-width-and-height-returning-as-0.160691/