IQSS / IQSS/dataverse

Feature Request/Idea: Thumbnails should be created for more (and even custom) datatypes

Open
#8,194 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: File Upload & Handling Type: Suggestion
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

Dear Dataverse community,
Thumbnails should be created for more (and even custom) datatypes
Overview of the Feature Request

What kind of user is the feature intended for?
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
Curator, Depositor, Guest, Searcher

What inspired the request?
We noticed that the thumbnails are only generated for images and PDFs.
The source of edu.harvard.iq.dataverse.dataaccess.ImageThumbConverter clearly says that thumbnails are only attempted to be generated in case of image or pdf:


            // try to generate, if not available: 
            boolean generated = false;
            if (file.getContentType().substring(0, 6).equalsIgnoreCase("image/")) {
                generated = generateImageThumbnail(storageIO, size);
            } else if (file.getContentType().equalsIgnoreCase("application/pdf")) {
                generated = generatePDFThumbnail(storageIO, size);
            }
....

What existing behavior do you want changed?
Actually, the thumbnail creation in dataverse seems to rely on Imagemagick. Imagemagick can deal with a variety of data formats and even with custom formats. The motivation for limitation of this functionality in dataverse to images and pdfs is not clear. I can imagine having a customizable property where the Sysadmin can tell, which datatypes to send for conversion (and how the conversion command should be built)

Any brand new behavior do you want to add to Dataverse?
This is not a "brand new" functionaliity request, I guess..

Any related open or closed issues to this feature request?
The issue https://github.com/IQSS/dataverse/issues/6450 is related (though it embraces a much larger problem)

PS: Our fresh research data management team at the Bonn University decided to employ Dataverse as the research data repository thus we might be bit more active here in the future and produce such requests more often, thanks!

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 with edu.harvard.iq.dataverse.dataaccess.ImageThumbConverter and review issue #6450 for the broader related problem. Trace how content types reach thumbnail generation and how ImageMagick is currently invoked. Done would require an agreed, configurable approach for additional and custom datatypes, including conversion behavior and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.