diff --git a/lib/utils/client_manager.dart b/lib/utils/client_manager.dart index 856a907ab..ffb687926 100644 --- a/lib/utils/client_manager.dart +++ b/lib/utils/client_manager.dart @@ -123,7 +123,9 @@ abstract class ClientManager { // To make room emotes work 'im.ponies.room_emotes', }, - customImageResizer: customImageResizer, + customImageResizer: PlatformInfos.supportsCustomImageResizer + ? customImageResizer + : null, logLevel: kReleaseMode ? Level.warning : Level.verbose, database: await flutterMatrixSdkDatabaseBuilder(clientName), supportedLoginTypes: { diff --git a/lib/utils/platform_infos.dart b/lib/utils/platform_infos.dart index 0f225b733..1c1b26236 100644 --- a/lib/utils/platform_infos.dart +++ b/lib/utils/platform_infos.dart @@ -33,6 +33,9 @@ abstract class PlatformInfos { static bool get supportsVideoPlayer => !PlatformInfos.isWindows && !PlatformInfos.isLinux; + static bool get supportsCustomImageResizer => + PlatformInfos.isWeb || PlatformInfos.isMobile; + /// Web could also record in theory but currently only wav which is too large static bool get platformCanRecord => (isMobile || isMacOS || isWeb);