Skip to content

feat(images): open JPEG 2000 where the server renders it - #53

Open
skjnldsv wants to merge 1 commit into
mainfrom
feat/jp2-mime
Open

skjnldsv wants to merge 1 commit into
mainfrom
feat/jp2-mime

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

@mexthecat opened nextcloud/viewer#2587 back in October 2024 to add image/jp2 to this list. It was the right change with nothing behind it, which is probably why it stalled: the list is filtered against the server's enabled preview providers, and none of them handled jp2, so the entry was dropped again on every server.

nextcloud/server#64603 adds that provider, so the entry now means something. Their Co-authored-by is on the commit.

That PR needs to land first. On its own this does nothing rather than anything wrong, since the filter drops what no provider backs.

jp2 goes in the preview list rather than beside the browser formats because nothing decodes it client side. I checked: <img> and createImageBitmap both fail in Chromium and Firefox, and libgd has no JPEG 2000 support either. The server rendering it is all the support there is, which is the arrangement image/tiff has always had.

Worth saying plainly: providers like this are off until an admin enables them, so most servers still will not open a .jp2.

Two tests, one each way: it opens where the server reports a provider for jp2, and it does not where the server reports only jpeg.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

Picks up nextcloud/viewer#2587 by mexthecat, which was right and had
nothing to stand on: the list it adds to is filtered against the
server's enabled preview providers, and none of them claimed image/jp2,
so the entry was dropped again on every server.

nextcloud/server#64603 adds the provider, so the entry now means
something wherever an admin enables it, which is how tiff beside it has
always worked.

Co-authored-by: mexthecat <mexthecat@users.noreply.github.com>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added status: review Waiting for reviews type: enhancement 🚀 New feature or request AI assisted labels Sep 20, 2026
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.11%. Comparing base (a640b9f) to head (e776e9e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #53   +/-   ##
=======================================
  Coverage   88.11%   88.11%           
=======================================
  Files          37       37           
  Lines        2625     2626    +1     
  Branches      558      558           
=======================================
+ Hits         2313     2314    +1     
  Misses        305      305           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted status: review Waiting for reviews type: enhancement 🚀 New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant