chat-images icon indicating copy to clipboard operation
chat-images copied to clipboard

Suggestion: Max image resolution or file size

Open Matthew-Whitlock opened this issue 3 years ago • 1 comments

I'm looking to lower my world's load times, and while the chat images aren't huge some of them are 0.5-1.5mb which isn't necessary for displaying in the chat window.

If it's not too difficult to program, being able to configure max dimensions on images and automatically scaling uploads to fit that would be rad.

I'm not too certain how the file downloads are ordered in foundry, though looking in the dev tools in chrome it does seem like they are loaded in before the foundry window is displayed.

Matthew-Whitlock avatar Oct 03 '22 06:10 Matthew-Whitlock

The images are already compressed to a max of 1.5Mb if possible.

// FileProcessor.ts:51
const compressedImage = await imageCompression(saveValue.file as File, {maxSizeMB: 1.5, useWebWorker: true, alwaysKeepResolution: true})

The bigger problem here is that (as far as I know) foundry doesn't paginate it's chat messages, and it gets everything on initial load.

bmarian avatar Oct 27 '22 01:10 bmarian