diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
index 1ab9d464e..8a1029464 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
@@ -127,7 +127,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
invalidateOptionsMenu()
supportActionBar?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
- supportActionBar?.title = Html.fromHtml("${mPath.getFilenameFromPath()}")
+ val filename = getCurrentMedium()?.name ?: mPath.getFilenameFromPath()
+ supportActionBar?.title = Html.fromHtml("$filename")
window.statusBarColor = Color.TRANSPARENT
}