diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt
index 36bf6fe8e7..fa6b0af2bc 100644
--- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt
+++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDownloadScreen.kt
@@ -55,6 +55,11 @@ object SettingsDownloadScreen : SearchableSettings {
pref = downloadPreferences.saveChaptersAsCBZ(),
title = stringResource(R.string.save_chapter_as_cbz),
),
+ Preference.PreferenceItem.SwitchPreference(
+ pref = downloadPreferences.splitTallImages(),
+ title = stringResource(R.string.split_tall_images),
+ subtitle = stringResource(R.string.split_tall_images_summary),
+ ),
getDeleteChaptersGroup(
downloadPreferences = downloadPreferences,
categories = allCategories,
diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
index d42479e221..fe54e42640 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
@@ -495,6 +495,8 @@ class Downloader(
}
private fun splitTallImageIfNeeded(page: Page, tmpDir: UniFile) {
+ if (!downloadPreferences.splitTallImages().get()) return
+
try {
val filenamePrefix = String.format("%03d", page.number)
val imageFile = tmpDir.listFiles()?.firstOrNull { it.name.orEmpty().startsWith(filenamePrefix) }
diff --git a/domain/src/main/java/tachiyomi/domain/download/service/DownloadPreferences.kt b/domain/src/main/java/tachiyomi/domain/download/service/DownloadPreferences.kt
index 060963028a..cc930cf513 100644
--- a/domain/src/main/java/tachiyomi/domain/download/service/DownloadPreferences.kt
+++ b/domain/src/main/java/tachiyomi/domain/download/service/DownloadPreferences.kt
@@ -14,6 +14,8 @@ class DownloadPreferences(
fun saveChaptersAsCBZ() = preferenceStore.getBoolean("save_chapter_as_cbz", true)
+ fun splitTallImages() = preferenceStore.getBoolean("split_tall_images", false)
+
fun autoDownloadWhileReading() = preferenceStore.getInt("auto_download_while_reading", 0)
fun removeAfterReadSlots() = preferenceStore.getInt("remove_after_read_slots", -1)
diff --git a/i18n/src/main/res/values/strings.xml b/i18n/src/main/res/values/strings.xml
index b6da8239f3..78ed4d8728 100644
--- a/i18n/src/main/res/values/strings.xml
+++ b/i18n/src/main/res/values/strings.xml
@@ -443,6 +443,7 @@
Only works on entries in library and if the current chapter plus the next one are already downloaded
Save as CBZ archive
+ Split tall images
Improves reader performance