diff --git a/lib/models/Courseware/BlockTypes/Gallery.json b/lib/models/Courseware/BlockTypes/Gallery.json
index f301000f7ee318b798b8324bcee6673ed956b0a6..78e2747636524c15c904e25accd2195441f0b8f7 100644
--- a/lib/models/Courseware/BlockTypes/Gallery.json
+++ b/lib/models/Courseware/BlockTypes/Gallery.json
@@ -19,6 +19,9 @@
         },
         "show_filenames": {
             "type": "string"
+        },
+        "mouseover_filenames": {
+            "type": "string"
         }
     },
     "required": [
diff --git a/lib/models/Courseware/BlockTypes/Gallery.php b/lib/models/Courseware/BlockTypes/Gallery.php
index 9ebc9df064a9578fc7ad89eb38923bc3a1fb3cdf..2ad19b970c72e78b4707939ce835dd50b389be40 100644
--- a/lib/models/Courseware/BlockTypes/Gallery.php
+++ b/lib/models/Courseware/BlockTypes/Gallery.php
@@ -94,6 +94,7 @@ class Gallery extends BlockType
             'nav' => 'true',
             'height' => '610',
             'show_filenames' => 'true',
+            'mouseover_filenames' => 'false',
         ];
     }
 
diff --git a/resources/assets/stylesheets/scss/courseware.scss b/resources/assets/stylesheets/scss/courseware.scss
index 79476bae70ea5e6b89ee9f357bccea6b745655fc..536c5c851087fdc8d9c7c96b5a94e85da6d8b0f9 100644
--- a/resources/assets/stylesheets/scss/courseware.scss
+++ b/resources/assets/stylesheets/scss/courseware.scss
@@ -4070,6 +4070,14 @@ g a l l e r y  b l o c k
         background-color: fade-out($black, 0.6);
         padding: 0.5em;
     }
+
+    &.show-on-hover {
+        display: none;
+    }
+}
+
+.cw-block-gallery-content:hover .show-on-hover {
+    display: block;
 }
 
 .cw-block-gallery-number-text {
diff --git a/resources/vue/components/courseware/CoursewareGalleryBlock.vue b/resources/vue/components/courseware/CoursewareGalleryBlock.vue
index 8b331473674cac39e532f6fa692fdc63cf4fe9b3..f6d41ab74e07da0af8f0dbe70b56fa4a34ffa0cc 100644
--- a/resources/vue/components/courseware/CoursewareGalleryBlock.vue
+++ b/resources/vue/components/courseware/CoursewareGalleryBlock.vue
@@ -27,7 +27,8 @@
                                 }
                             "
                         />
-                        <div v-if="currentShowFileNames === 'true'" class="cw-block-gallery-file-name">
+                        <div v-if="currentShowFileNames === 'true' && image?.attributes?.name" class="cw-block-gallery-file-name"
+                            :class="{'show-on-hover': currentMouseoverFileNames === 'true'}">
                             <span>{{ image.attributes.name }}</span>
                         </div>
                     </div>
@@ -72,6 +73,15 @@
                             <option value="false"><translate>Nein</translate></option>
                         </select>
                     </label>
+                    <label v-if="currentShowFileNames === 'true'">
+                        {{ $gettext('Dateiname erscheint bei Mouseover') }}
+                        <studip-tooltip-icon
+                            :text="$gettext('Der Dateiname wird angezeigt, wenn Sie den Mauszeiger über den Inhalt bewegen.')"/>
+                        <select v-model="currentMouseoverFileNames">
+                            <option value="true"><translate>Ja</translate></option>
+                            <option value="false"><translate>Nein</translate></option>
+                        </select>
+                    </label>
                 </form>
             </template>
             <template #info>
@@ -106,6 +116,7 @@ export default {
             currentNav: '',
             currentHeight: '',
             currentShowFileNames: '',
+            currentMouseoverFileNames: '',
             currentAutoplayTimer: '',
             editModeFiles: [],
             slideIndex: 0,
@@ -136,6 +147,9 @@ export default {
         showFileNames() {
             return this.block?.attributes?.payload?.show_filenames;
         },
+        mouseoverFileNames() {
+            return this.block?.attributes?.payload?.mouseover_filenames ?? 'false';
+        },
         files() {
             if (!this.editMode) {
                 return this.block?.attributes?.payload?.files;
@@ -158,6 +172,7 @@ export default {
             this.currentNav = this.nav;
             this.currentHeight = this.height;
             this.currentShowFileNames = this.showFileNames;
+            this.currentMouseoverFileNames = this.mouseoverFileNames;
         },
         startGallery() {
             this.slideIndex = 0;
@@ -218,6 +233,7 @@ export default {
             attributes.payload.nav = this.currentNav;
             attributes.payload.height = this.currentHeight;
             attributes.payload.show_filenames = this.currentShowFileNames;
+            attributes.payload.mouseover_filenames = this.currentMouseoverFileNames;
 
             this.updateBlock({
                 attributes: attributes,