nextcloud / nextcloud/tables

Ability to choose image preview size

Open
#1,462 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

At the moment when you create a link to an image saved inside Nextcloud Files, Tables creates a very small preview image of that file (actually, this worked some time ago, has been gone and now should work again when https://github.com/nextcloud/tables/pull/1393 is accepted).

Looking at the code I think this value at the moment is hardcoded to 25x25px.
My idea would be to let the user choose how big this preview should be. This would give us the chance to use Tables for example for:

some sort of inventory with a preview of the item (workshop tools, borrowed things)
create a todo list where people can add a picture of something to do (for example a photo of a defective asset)
a list of members of a club with their photo beside
Although it would be even greater to be able to upload new images directly from the input form (like already requested in the "additional columns" discussion) I would expect that having bigger previews of linked images would already be an enhancement.

As I'm new to this I asked myself if enhancing Tables to let the user choose the preview size would be very difficult?

Some of the points that would be needed and that came into my mind are:

Some kind of preference dialog where a user could set the preview size of the images. Maybe this should be settable for every table because the users sometimes would need bigger images in one table and just small ones in an other.
The possibility to save this preference inside the database beside the other values like name of the table.
Remove (or adapt) the preview link that at the moment is saved to the database when an image is linked in a column: at the moment every link inside thumbnailUrl is saved with an url like index.php/core/preview?fileId=123456&x=32&y=32 and therefore when setting Tables to show a bigger preview should use an other preview format (like x=128&y128).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the current 25x25 thumbnailUrl generation and review PR #1393 to understand the existing image-link behavior. Then inspect how table preferences such as the table name are stored; done means a per-table preview size can be selected, persisted, and applied to linked image previews.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.