"Keep original" + packed images --> Invalid file
Using Keep original, when original source file can't be retrieved (for example because there are packed images), this generate invalid file (image without an uri)

Better to not export texture at all, will be better than export an invalid glTF file
diff --git a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
index baee02bd..e1ec4bf7 100644
--- a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -47,6 +47,9 @@ def gather_image(
     else:
         # Retrieve URI relative to exported glTF files
         uri = __gather_original_uri(image_data.original.filepath, export_settings)
+        # In case we can't retrieve image (for example packed images, with original moved)
+        # We don't create invalid image without uri
+        if uri is None: return None
 
     buffer_view = __gather_buffer_view(image_data, mime_type, name, export_settings)
 
diff --git a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py
index 96146523..8cc880d5 100644
--- a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py
+++ b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py
@@ -48,6 +48,7 @@ def gather_texture(
     )
 
     # although valid, most viewers can't handle missing source properties
+    # This can have None source for "keep original", when original can't be found
     if texture.source is None:
         return None
 
['addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py', 'addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture.py']