Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

Uploaded Map files increase by a factor of 10 ???

1657693485

Edited 1657698661
I created a few custom optimised maps. When I add them to roll20, the file size increases by a factor of 10. Via the console I see it has increased 4-5 times. Why is this happening?  Original Map Size: 1.2mb Reported map size in chrome console source: 4.3MB Downloading the map from roll20: 12.5mb Why do the maps end up larger file size than uploaded source. It kills game performance. I am using jpg files.
1657721811

Edited 1657721836
Kraynic
Pro
Sheet Author
Because the vtt does not use jpg files.  Everything gets converted to png for various vtt mechanics to function, such as any image on the GM layer having transparency when you are on another layer.  At the same time, the images are also generated in full, thumbnail, and maybe an intermediate size as well.  That way the map page bar isn't having to render the full size image of each of your maps.  Your storage quota is only reduced based on the file size of your jpg (original file). If you look at your redownloaded map, you will notice it isn't jpg.
The downloaded file and the one in the console source are all jpg. I do understand that some files need transparency, and as such png is a good format for those. However I don't understand why maps need to be converted to PNG. The map layer does not require any transparancy at all and should remain the background of the player area..I am ONLY talking about maps, which go on the map layer. Having a transparent png file on top of a jpg lower layer should be feasible and in fact should work that way to reduce lag from large files. I can barely load small maps let alone large ones, or ones that are over 10mb...to me that is insane for web. Maybe if you live in USA or somewhere else where you can utilise your full bandwidth it doesn't matter. But from my location i get anywhere from a few 100k to a few mbs.(even tho I am 100mbs). Anyways thanks for the reply, even though I do not see any PNG files via the console, that does explain why the files are so HUGE and why everyone I know has issues loading roll20 with large maps. Sounds like a design flaw to me.
1657760843
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi dakka! It's a tradeoff. If Roll20 optimized for file size, other folks would be advocating for quality. By saving your upload at 4 different resolutions, they are always sending the most efficient file size for your zoom level. By choosing png, the app ensures lossless quality when resizing. The app also saves the png as a progressive png, so your image is quickly visible while still downloading. This is why particularly large maps may appear blurry at first before sharpening.
1657761144
Kraynic
Pro
Sheet Author
dakka . said: Anyways thanks for the reply, even though I do not see any PNG files via the console, that does explain why the files are so HUGE and why everyone I know has issues loading roll20 with large maps. Sounds like a design flaw to me. All I can say is that I tested this by going to the map layer, selecting a map image that I had uploaded as a .jpg, hit the Z key to pop it up, right clicked on it to select save as from the menu, and it downloaded as a .png.  The actual image in use on the vtt was a png.  And if they end up doing foreground/background and allowing us to do multilevel things, then map images will indeed need transparency.
Thanks for the replies. I do appreciate the time taken to post. The image that was 12.5mb I downloaded via the console source images (via F12). Perhaps these are not the ones its using, however converting to PNG would explode the highly compressed JPG files i make radically. Either way, I will just continue to struggle with roll20 and big maps like everyone else...lol.
1657775298
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can upload maps in pieces and assemble them on the VTT. Often, this will grant you better performance.
Kraynic said: dakka . said: Anyways thanks for the reply, even though I do not see any PNG files via the console, that does explain why the files are so HUGE and why everyone I know has issues loading roll20 with large maps. Sounds like a design flaw to me. All I can say is that I tested this by going to the map layer, selecting a map image that I had uploaded as a .jpg, hit the Z key to pop it up, right clicked on it to select save as from the menu, and it downloaded as a .png.  The actual image in use on the vtt was a png.  And if they end up doing foreground/background and allowing us to do multilevel things, then map images will indeed need transparency. Tested it and for me it was JPG also. Wonder why the map that I downloaded was just named "original.jpg". Why does roll20 not use the name of the file that was originally uploaded? Noticed the same for all other images as well!
1657813657
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can only assume there are valid programming reasons. I can think of several possibilities, but they would all be pure speculation. As for the keyword "original", every file gets four versions and corresponding names, depending on resolution: Original, Max, Med, and Thumb. These are served as needed depending on zoom level, similar to the method used by sites like Google Maps. I agree that keeping the original file name even as a tag would be amazingly helpful, especially if it were readable by the API. You could do some amazing things with some predictable identifiers.
JPGs uploaded after 2019-12-03 18:58:17 (the first timestamp that i found were this happened) are technically uploaded as PNGs (though the extension stays jpg). This conversion is the reason that filesize become so large.
1657928744
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I remember running tests at the time of the switchover. Fortunately, only the original upload size is counted against a user's Storage Quota.