{"id":54114,"date":"2026-03-04T12:43:13","date_gmt":"2026-03-04T10:43:13","guid":{"rendered":"https:\/\/www.main-vision.com\/richard\/blog\/?p=54114"},"modified":"2026-03-04T12:43:13","modified_gmt":"2026-03-04T10:43:13","slug":"on-photoprism-claude-and-heic-files-on-a-pi","status":"publish","type":"post","link":"https:\/\/www.main-vision.com\/richard\/blog\/on-photoprism-claude-and-heic-files-on-a-pi\/","title":{"rendered":"On Photoprism Claude, and HEIC Files on a Pi"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><p>When I migrated my Photoprism library from an HP Laptop to a Pi5 I found that there was a nine thousand photo hole in the total photo count. It&#8217;s when I looked closer that I found that the gap between expected photos and actual photos is down to Photoprism and the Pi5 not playing nicely when it comes to HEIC files.<\/p>\n<p>I decided to experiment with Claude AI as it is flavour of the month and the first advice it gave was &quot;force reindex the entire library&quot;. Anyone who has played with raspberry Pi will know why that was an absurd proposition. I played along anyway and within minutes my Pi was sulking so I went for a walk, on the off chance that it would be ready when I got home. It was still sulking, and worse than that, pings took up to 30 milliseconds or more.<\/p>\n<p>I tried sudo reboot, and I tried a soft reset via the button. I waited a while and when neither worked I went for a hard reboot. That&#8217;s when the photo drive failed to mount properly so I rebooted the Pi properly and the drive mounted so I could continue.<\/p>\n<h2>The Photosync JPEG experiment<\/h2>\n<p>Now that we see that blind trust in Claude is misplaced we can use the human rational mind. As I saw that the photos that were missing appeared to be iphone photos I decided to change the photosync presets for uploading to the Pi5 Photoprism instance. I told it only to upload JPEGs. I refreshed the index via the web UI.<\/p>\n<h2>The Shell Script<\/h2>\n<p>Now that we determined that the HEIC files were missing and that refreshing the index was not working we went ahead with creating a shell script that would convert HEIC files to jpeg files using heif-convert.<\/p>\n<p>The shell script found the HEIC files, in situ, converted them to jpeg and then deleted the HEIC files. The result is a HEIC free library.<\/p>\n<h2>The Result<\/h2>\n<p>After re-indexing the library with the jpegs we had 115,000 files, rather than 110,000 so we recovered 5000 files, out of 9000. When I explored the library this morning I saw that the iphone photos seem to be there, and that the library, especially for recent photos, is healthier.<\/p>\n<h2>Tensorflow Disable: True<\/h2>\n<p>In this situation it was necessary to disable tensorflow because it led to the Pi crashing twice, where I had to hard reset. With Immich you have granular control on what it is doing so with a Pi you can be as gentle, or as demanding as you want. If you&#8217;re gentle it runs for hours, without crashing. If you&#8217;re not it crashes. <\/p>\n<p>Disabling tensorflow allowed me to try a final index within minutes rather than hours, or days.<\/p>\n<h2>And Finally<\/h2>\n<p>The calamity of having 9000 images, seemingly all camera phone photos missing can be quite distressing, until you realise that the missing images appear to be HEIC files. I know that I prefer to keep HEIC files, rather than converted files, when possible. With Photoprism, and a Pi5 it makes sense to keep things simple, and upload JPEGs.<\/p>\n<p>Due to these circumstances I see Photoprism on the Pi as a backup solution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>When I migrated my Photoprism library from an HP Laptop to a Pi5 I found that there was a nine thousand photo hole in the total photo count. It&#8217;s when I looked closer that I found that the gap between expected photos and actual photos is down to Photoprism and the Pi5 not playing nicely [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[20,9],"tags":[7167,7165,7168,6367,7166,6741],"class_list":["post-54114","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-observation","category-tech-related","tag-converting","tag-heic","tag-jpeg","tag-pi","tag-script","tag-shell"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/54114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/comments?post=54114"}],"version-history":[{"count":1,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/54114\/revisions"}],"predecessor-version":[{"id":54117,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/posts\/54114\/revisions\/54117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/media\/11292"}],"wp:attachment":[{"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/media?parent=54114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/categories?post=54114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.main-vision.com\/richard\/blog\/wp-json\/wp\/v2\/tags?post=54114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}