The Image Optimizer

Image Optimizer

The Image Optimizer is a feature of The Forge. It automatically transforms image assets so that they load faster and perform better for your players.

In the past, this feature also allowed in-app image flipping, and blurring. This feature is currently limited due to a change in CDN (Content Delivery Network). We hope to restore functionality in a future update.

Currently, the image optimizer automatically converts images into better performing .webp files, and will use those over the original file if there is a significant decrease in the original file size. At the moment, it does not resize the pixel dimensions of an image.

GPU Texture limit avoidance

Many Game Masters like to use high resolution maps for their games, or simply use a map without thinking about its resolution. To be clear, this means maps with significant pixel length or width- not the actual file size of the map.

Unfortunately, while these images may work for some users (such as the GM), they may not load for all players, or across all machines accessing the game. There is a base limitation of 16384x16384 pixels to load a map at all within Foundry VTT, due to underlying WebGL technology. But most browsers will automatically detect the performance of a user’s PC, and prevent images from being loaded past a certain size.

Therefore, while an image may load on a user’s particularly powerful PC/laptop, it may fail to load on another user’s weaker device. Typically, these size limitations are around 16384x16384, 8192x8192, or 4096x4096. The latter is most common on users accessing Foundry through integrated graphic cards found within laptops.

To prevent this, we recommend users keep images at or below a resolution of 4096 at any pixel dimension- this will ensure that the image will load for everyone.

A Workaround

If a GM wishes to keep using high quality maps, but keep them functioning for users with weaker laptops, a map can be split up into two or more smaller images, and then placed as tiles within Foundry VTT. This will neatly sidestep potential canvas limitations.

However, it should be noted that these tiles will not perform as well as scene images. Additionally, large maps like these will cause other performance issues, especially when using dynamic lighting alongside them. For users with already weak machines, this can greatly interfere with the base functionality of Foundry VTT. We recommend caution when taking this approach.

2 Likes

Hey, kakaroto, how are you doing? Any difference if I load my maps by links from Imgur? Any advice?

Hey JC1, not KaKaRoTo here, but still Forge staff. If you load maps from Imgur they won’t be as optimized as they are through our CDN service, meaning users (including you) may experience longer loading times. It also subjects you to the whims of Imgur, and if the website decides to alter the way it distributes your images (reducing their resolution, choosing not to send it to a website, etc.). You can do it, we just wouldn’t recommend it.

1 Like

Hy, DestinyGrey, how are you? Thank you for the information. I will change to maps from my assets library, there really is plenty of room for a lot of maps there.

Thx DestinyGrey.
@jc1 Another issue you might have if using imgur links is with regards to CORS which I think imgur uses to prevent its images from being used on any other website. I know many image sites do that, so it would not work necessarily even work with Foundry.

1 Like

@kakaroto Thank you for the advice!

Hi Thanks for the info! Is this feature still “currently limited” and does that mean “not functional?” Starting to experience some slow down in loading times and wondering if it’s worth it to convert my files from png to webp myself, and watch their size.

Hi.
Yes, the feature is still limited at the moment. We do have the png to webp automatic conversion however, that’s working, so you shouldn’t need to do it manuall. One of the limitations we have is that we’re not downsizing or creating thumbnails for the images, so it’s not as fast as it should be when you’re browsing the assets library, but they’ll still be served as webp.