Are there limits to the save file size?

I'm using the save files to store images in my plugin and noticed this:

DataManager.saveGameWithoutRescue = function(savefileId) {    var json = JsonEx.stringify(this.makeSaveContents());    if (json.length >= 200000) {        console.warn('Save data too big!');    }And yes, I'm getting this warnning when I save a new file. 

Is there a way to make this limit higher? Actually a save file of 160kb is making this warn appears in my console. 

Do I lost data in files bigger than the "limit"? Or it is just for loading speed purposes?

 
That really isn't a hard limit. It will only warn you that your data is large, because web browsers limit the amount of storage on the device to about 10MB per site. For mobile browsers, and in this case the mobile app version of your game, the limit is likely 5MB. The limits may vary from browser to browser, and device to device, but these are goo estimates to look at.

A better answer, rather than increasing the "limit", is to not save images in the save file. Why are they saved there? Images aren't usually easily compressible, because they're generally as compressed as possible when you get them. What do you need to save these images for? What's their purpose?

You won't lose data, but you'll reduce the amount of space you can use to store other files and information. And it isn't for leading speed, necessarily, either, because the save data is stored in the web browser, so it stays on the player's computer. it isn't sent anywhere.
He saves screenshots of the moment the game was saved.

Edit: You can compress the image to get a smaller file, check my mapshot plugin, as I believe I did that there.
@Zalerinian 
Well, as Hudell said, I made a plugin that shows a Screenshot of the moment where the player saved in a save status window. You can look at it in this topic: http://forums.rpgmakerweb.com/index.php?/topic/51475-arks-save-engine-complete/
I just need to do it because if I don't I get serious problems, specially when this feature have to be used in mobile devices.

But, for me to understand it better... It is 5mb of cache or 5mb of save files?
If this includes the cached images,  5mb is too little, too short space. Makes me understand why my game always crashes on the web browsers of my mobiles. haha (yeah, it's impossible to play them on my Moto G or LG v400 internet browsers, but they run fine as apks)
It's a really serious problem, because a complete rpg maker game using fine grafics would never use only 5 mb...

@Hudell
Well, I think that I'm using your compressor code, I really don't know. Because the second part of it was before the .png creating thing, and that part of the code can't be read by the game. Then what should I do? Decompress it when calling the image to be showed? 
I'll try it, but reply my question anyway hehe tks
Nope, to use compression, change the toDataUrl call:

ark_urlData = resized._canvas.toDataURL();to:

ark_urlData = resized._canvas.toDataURL('image/jpeg', 0.7);This will generate a jpg with 70% quality
@hudell
Guy! This reduced the file size by more than 60%. You are really awesome! haha  😮  

I think I will not have more problems with this "limit" thing. Or much less problems hehe  🤘   🤣   
But, for me to understand it better... It is 5mb of cache or 5mb of save files?

If this includes the cached images,  5mb is too little, too short space. Makes me understand why my game always crashes on the web browsers of my mobiles. haha (yeah, it's impossible to play them on my Moto G or LG v400 internet browsers, but they run fine as apks)

It's a really serious problem, because a complete rpg maker game using fine grafics would never use only 5 mb...
It's 5MB of storage for whatever is put into the localStorage variable. Images in the game are not stored there, and so do not count against the limit, unless you explicitly save an image to localStorage. The limit is there to prevent a malicious website from filling a user's hard drive, as a computer needs empty space to run. If your computer has 0 empty space, it cannot properly run, as it needs somewhere to store temporary data, which will use up disk space.

Typically, I dislike Jpegs, since they're lossy, but in this case I suppose it should work nicely for what you need to do.
I tested with no plugin at all...

then create a small map. create one event with picture but no event command (sorta like decoration event to add detail to map).

then i copy it until reaching 200 event. save in that map. it caused save file too big warning too.

it's only 47kb though.

so in summary 5mb allow us to have map with around 21.275 such events. (i don't remember what's the editor event limitation. but i'm sure someday there's a plugin to break that...)
Hmm, good to know there's this limitation. I'll probably change my game to not save the events then.

Original thread: https://forums.rpgmakerweb.com/threads/are-there-limits-to-the-save-file-size.52008/