MV Clear specific cached images

Hi All,

I was wondering if there was a script that can be called to remove specific images from the cache? I know you can use
JavaScript:
ImageManager.clear();
to wipe everything, but I would like to clear specific items at specific times.

Any help or advice would be greatly appreciated.
You probably won't be able to unload one specific image from memory, but I could be wrong.

1. To load an image into memory:
ImageManager.loadPicture("Name of picture"); // without image format like blabla.PNG

2. When you change the location in your project or enter a JRPG battle, the game clears the last images from memory anyway!

3. If you are using a global event via a database, then the images are probably not cleared just like that (if you loaded them into memory), then the ImageManager.clear(); command will help.

4. You can use the plugin from Galv, it is more flexible. https://galvs-scripts.com/2017/04/26/mv-image-cache/

5. sumrndm has a plugin that can load all the images in the pictures folder and keep them in memory ALWAYS! But be careful, if your project has a lot of high-quality images, you will probably break the optimization. I had a project with 500 images, the game literally crashed. http://sumrndm.site/preloader-core/
just to put it out there: the OP asked it years ago
for anyone looking, make sure to look inside of
Code:
ImageManager._imageCache._items
to confirm the key of the image youre removing. once you have it you can try
Code:
delete ImageManager._imageCache._items[key]
//e.g. ImageManager._imageCache._items["img/battlebacks1/Crossroads.png:0"]
Necro-post notice: @wecanfayo If OP still needs the thread, they can request it to be reopened.

Original thread: https://forums.rpgmakerweb.com/threads/clear-specific-cached-images.161133/