PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

BUG: TIFF photos can't be opened in the image viewer

Open ManyaJain111 opened this issue 3 weeks ago • 5 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

What happened?

Since #1532, PictoPy imports .tif/.tiff files and they show up fine in the gallery grid. But clicking one opens the image viewer with a broken-image icon instead of the photo. JPG photos open normally.

Steps to reproduce

  1. Add a folder containing a .tif image and a .jpg image
  2. Both show up on Home with correct thumbnails
  3. Click the .jpg → opens in the viewer normally
  4. Click the .tif → the viewer shows a broken-image icon instead of the photo

Screenshots

Image Image Image

Screenshots:(1) both photos import with correct thumbnails, (2) the .jpg opens normally in the viewer. (3) the .tif shows a broken-image icon in the viewer

Record

  • [x] I agree to follow this project's Code of Conduct

ManyaJain111 avatar Nov 04 '26 19:11 ManyaJain111

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Nov 04 '26 19:11 github-actions[bot]

@rohan-pandeyy if this is considered a valid issue, can I work on it ?

ManyaJain111 avatar Nov 04 '26 19:11 ManyaJain111

⚠️ Potential Duplicate Issue (Semantic Match)

This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:

  1. BUG: "Open Original File" button in Media Info Panel shows no action (#1165, closed) https://github.com/AOSSIE-Org/PictoPy/issues/1165 Similarity: 71.4%

  2. BUG: Open Folder Button in Image Viewer Does Nothing (#959, closed) https://github.com/AOSSIE-Org/PictoPy/issues/959 Similarity: 67.6%

  3. BUG: Open folder and open original file button donot work in image viewer (#1017, open) https://github.com/AOSSIE-Org/PictoPy/issues/1017 Similarity: 63.5%

Please review before proceeding.

github-actions[bot] avatar Nov 04 '26 19:11 github-actions[bot]

Hi @rohan-pandeyy, I'd like to work on this issue.

I reproduced the cause: the grid shows JPEG thumbnails, but the viewer loads the original file into an , which the webview can't decode for TIFF. (The pending HEIC support in #1577 doesn't touch the viewer, so HEIC would likely hit the same problem.)

I have a fix ready locally and will wait for assignment before opening a PR:

  • new GET /images/{image_id}/preview in the backend. The path is read from the DB by id, and it returns a JPEG (16-bit, CMYK, palette and multi-page TIFFs handled)
  • the viewer uses it for .tif/.tiff and still loads everything else straight from disk
  • http://localhost:52123 added to the CSP img-src so the viewer can show the preview
  • 11 backend and 5 frontend tests; the full suites pass

Two questions: are on-the-fly previews fine, or would you prefer cached copies? And should .heic/.heif be added to the same path once #1577 merges?

Could you please assign this to me?

ArnabOPP avatar Nov 19 '26 19:11 ArnabOPP

Hi @Arnab I am already working on it please pick another issue. Thank you for understanding 🙏

ManyaJain111 avatar Nov 19 '26 20:11 ManyaJain111