Skip to content

Commit 1f4ca22

Browse files
committed
debug: add console logs to compressImageHandler
1 parent dad8aa5 commit 1f4ca22

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/lib/components/channel/MessageInput.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,22 @@
371371
372372
if (file['type'].startsWith('image/')) {
373373
const compressImageHandler = async (imageUrl, settings = {}, config = {}) => {
374-
// Quick shortcut so we dont do unnecessary work.
374+
// Quick shortcut so we don't do unnecessary work.
375375
const settingsCompression = settings?.imageCompression ?? false;
376376
const configWidth = config?.file?.image_compression?.width ?? null;
377377
const configHeight = config?.file?.image_compression?.height ?? null;
378378
379+
console.log('[DEBUG compressImageHandler]', {
380+
settingsCompression,
381+
configWidth,
382+
configHeight,
383+
settings,
384+
config: config?.file
385+
});
386+
379387
// If neither settings nor config wants compression, return original URL.
380388
if (!settingsCompression && !configWidth && !configHeight) {
389+
console.log('[DEBUG] Early exit - no compression needed');
381390
return imageUrl;
382391
}
383392

0 commit comments

Comments
 (0)