SUMMARY When exporting with images inside the kim file, the file may get bigger than 4GB (esp. if there are vidos among the data). These files cannot be imported or opened as zip files (after renaming). STEPS TO REPRODUCE 1. Export a lot of media files with the option "include in kim file" 2. Try to import this file into another database OBSERVED RESULT kim file cannot be opened EXPECTED RESULT kim file should be opened normally SOFTWARE/OS VERSIONS KPhotoAlbum: v6.1.0-14-g3705a5703 KDE Frameworks: 6.17.0 Qt: Using 6.8.2 and built against 6.8.2 TUXEDO OS (Xcb) Build ABI: x86_64-little_endian-lp64 Kernel: linux 6.14.0-115036-tuxedo ADDITIONAL INFORMATION The size limit should be made transparent on export or circumvented by using another zip library that does not have this limitation.
I exported an personal folder with 5.4G of images and videos. $ unzip -t 2017.kim Archive: 2017.kim warning [2017.kim]: 4294967296 extra bytes at beginning or within zipfile (attempting to process anyway) file #1: bad zipfile offset (local header sig): 4294967296 (attempting to re-compensate) testing: Images/imgp0465.mov OK error: not enough memory for bomb detection At least one error was detected in 2017.kim. $ 7z -t 2017.kim ... WARNING = 32-bit overflow in headers ...
Interestingly, my command-line zip (from Info-Zip) is built with LARGE_FILE_SUPPORT and can create a valid zip file of the same folder. $ unzip -qt images/2017.zip No errors detected in compressed data of images/2017.zip. $ echo $? 0 $ ls -l images/2017.zip -rw-rw-r-- 1 me me 5686177599 Dec 5 12:18 images/2017.zip So this is a limitation of KZip.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/kphotoalbum/-/merge_requests/61
Created upstream bug 514177.
Until there is an upstream resolution, kphotoalbum mitigates the bug by not allowing .kim files over 4GB: https://invent.kde.org/graphics/kphotoalbum/-/commit/bd21e0a672e67d96cf23a43232375e532a563d39
The link in comment #4 is incorrect. The correct upstream link is https://bugs.kde.org/show_bug.cgi?id=514117. The upstream bug is now fixed. Testing with the latest upstream build of karchive and the kphotoalbum workaround patch from comment #5 disabled, kphotoalbum exported a valid 5.4GB file: $ du -sh 2017.kim 5.4G 2017.kim $ unzip -qt 2017.kim No errors detected in compressed data of 2017.kim. The 5.4G file was successfully imported into a new database. We can remove the workaround patch and resolve this bug once the karchive fix is released.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/kphotoalbum/-/merge_requests/94
KPhotoAlbum now limits the size of an export file to less than 4 GB unless built against KArchive version 6.29.0 or later.
Git commit 0059d7b4830bdca9d8f3ab03fff1e3cd37d5c0cc by Johannes Zarl-Zierl. Committed on 28/08/2026 at 18:59. Pushed by johanneszarl into branch 'master'. Update Changelog Related: bug 512204 M +2 -0 CHANGELOG.md https://invent.kde.org/graphics/kphotoalbum/-/commit/0059d7b4830bdca9d8f3ab03fff1e3cd37d5c0cc