Exception: Preview generation has failed

I just started testing nextcloud for my home environment. I spun up a Ubuntu server 18.04.4 virtual machine and installed nextcloud via snap. I’ve uploaded roughly 2GB worth of images via the desktop client and am attempting to view said files via the gallery in the web browser. I’m noticing that the small images (approximately less than 15MB) generate a preview and open in the gallery just fine while images that are (approximately larger than 15MB) fail to load. Attempting to open a large image results in a “Error loading filename.jpg” exception being thrown. I suspect something is running out of memory, but i’m not sure where to look or what to reconfigure. What do I need to do to correct this?

Nextcloud version (17.0.3):
Operating system and version (Ubuntu 18.04.4 LTS):
Apache or nginx version (not sure - NextCloud was installed via snap):
PHP version (not sure - NextCloud was installed via snap):

The output of your Nextcloud log in Admin > Logging:

[gallery] Error: Exception: Preview generation has failed

GET /index.php/apps/gallery/preview/175?width=2000&height=2000
from 192.168.174.217 by jake at 2020-03-09T16:07:53+00:00

[gallery] Error: OCP\Files\NotFoundException:  at <<closure>>

 0. /snap/nextcloud/19299/htdocs/lib/private/Preview/Generator.php line 126
    OC\Preview\Generator->getMaxPreview(OC\Files\SimpleFS\SimpleFolder {}, OC\Files\Node\File {}, "image/jpeg", "")
 1. /snap/nextcloud/19299/htdocs/lib/private/PreviewManager.php line 210
    OC\Preview\Generator->getPreview(OC\Files\Node\File {}, 2000, 2000, false, "fill", "image/jpeg")
 2. /snap/nextcloud/19299/htdocs/apps/gallery/lib/Service/PreviewService.php line 106
    OC\PreviewManager->getPreview(OC\Files\Node\File {}, 2000, 2000, false)
 3. /snap/nextcloud/19299/htdocs/apps/gallery/lib/Controller/Preview.php line 167
    OCA\Gallery\Service\PreviewService->createPreview(OC\Files\Node\File {}, 2000, 2000, true, false)
 4. /snap/nextcloud/19299/htdocs/apps/gallery/lib/Controller/Preview.php line 117
    OCA\Gallery\Controller\PreviewController->getPreviewData(OC\Files\Node\File {}, true, 2000, 2000, true, false)
 5. /snap/nextcloud/19299/htdocs/apps/gallery/lib/Controller/PreviewController.php line 134
    OCA\Gallery\Controller\PreviewController->getData(175, 2000, 2000)
 6. /snap/nextcloud/19299/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Gallery\Controller\PreviewController->getPreview(175, 2000, 2000)
 7. /snap/nextcloud/19299/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Gallery\Cont ... {}, "getPreview")
 8. /snap/nextcloud/19299/htdocs/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Gallery\Cont ... {}, "getPreview")
 9. /snap/nextcloud/19299/htdocs/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("PreviewController", "getPreview", OC\AppFramework\ ... {}, {fileId: "175",_ ... "})
10. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({fileId: "175",_ ... "})
11. /snap/nextcloud/19299/htdocs/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {fileId: "175",_ ... "})
12. /snap/nextcloud/19299/htdocs/lib/base.php line 997
    OC\Route\Router->match("/apps/gallery/preview/175")
13. /snap/nextcloud/19299/htdocs/index.php line 42
    OC::handleRequest()

GET /index.php/apps/gallery/preview/175?width=2000&height=2000
from 192.168.174.217 by jake at 2020-03-09T16:07:53+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => 'oc4csg70qodl',
  'passwordsalt' => 'pRXxMgMpSWeKf5T/+/LK3gt59jtvOF',
  'secret' => 'Wm2ztWV3qVCZMfqQVyRVov3UM0yqzkdCQXgm6yIXgy7AFQPN',
  'trusted_domains' =>
  array (
    0 => 'xxx.xxx.xxx.xxx hidden for privacy',
    1 => 'nextcloud.hidden for privacy',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '17.0.3.1',
  'overwrite.cli.url' => 'http://xxx.xxx.xxx.xxx hidden for privacy',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'KBOGJiBgAHrQ4o2ZUX5VmgLlrDWvOh5JESmM9NXMi27ms5n8yZpSQFvD4ReK1SkS',
  'installed' => true,
);