Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset Thumbnail API - Size Parameter #5679

Closed
djbrooke opened this issue Mar 22, 2019 · 9 comments
Closed

Dataset Thumbnail API - Size Parameter #5679

djbrooke opened this issue Mar 22, 2019 · 9 comments

Comments

@djbrooke
Copy link
Contributor

Different applications that index/integrate with Dataverse have different needs for thumbnail sizes. We should add the ability to specify the thumbnail size in the API. Copying in @landreev's comment below.


About the dataset logos:
Unlike datafile thumbnails, dataset thumbnails are hardcoded at 48 pixels; they were never meant to be blown up - so they look terrible when these other sites try to do that in their preview cards.
It should be easy to add a size parameter to this API call - let's open an issue for it.
But, as I mentioned earlier, I was afraid it would not work as easily for the dataset thumbnails that are made from specially uploaded images ("logos"). Because I thought we might be resizing them to 48 pixels on upload, and discarding the originals... But no - it looks like we generate and save the thumbnail as "dataset_logo.thumb48"; but also save the original - as "dataset_logo_original". So we can make copies at different resolutions later on - and we can do that for the already existing logos as well.

@djbrooke
Copy link
Contributor Author

  • As part of this we should review the text on the dataset thumbnail edit page "Supported image types are JPG, TIF, or PNG and should be no larger than 500 KB. The maximum display size for an image file as a dataset thumbnail is 48 pixels wide by 48 pixels high."

@pdurbin pdurbin self-assigned this Apr 1, 2019
pdurbin added a commit that referenced this issue Apr 2, 2019
Also, stop pretty printing the binary images which set off a bell in
terminals.

Note that pretty printing changes the size reported by REST Assured.
@pdurbin
Copy link
Member

pdurbin commented Apr 11, 2019

Unfortunately, I'm almost out of time before I go on vacation for a week so I pushed some scratch work to pdurbin@a3b704a but I'm happy to pick this up when I get back.

@scolapasta
Copy link
Contributor

@TaniaSchlatter @mheppler do we want to allow users pick any size? (including sizes that distort aspect ratio?) Or should we limit to a set of sizes (which we can have be a configurable setting?) In this scenario, you would ask for say 57x65 and it would return saying, available sizes are 48x48, 100x100, 250x250. (or whatever we choose / we can add in sizes as needed to the settings)

Alternatively, we could have them request "small", "medium", "large" and specify what those sizes mean.

Also @tainguyenbui any thoughts?

If we allow for any size, then we probably don't want to store them all, just the ones we need, and we would create others on demand. If we limit to certain sizes, then we can create the first time requested, and store for future, as needed.

@tainguyenbui
Copy link
Contributor

Hi @scolapasta thanks for mentioning me.

IMHO it should be something similar to what iOS, Android or cool favicons do, which is creating fixed size thumbnails for different devices. so something like a few fixed sizes available will probably create a more standardized approach. Alternatively, they could also retrieve the original image shall they want to transform it on their own.

There could also be an extra endpoint that retrieves all the image thumbnails available. The payload of this request could contain a CloudFront signed-url that would be available for 15 minutes for instance.

The creation of thumbnails can actually be done in a serverless way. The user would upload any size image up to something like 1.5 MB, and then the conversion pipeline creates several image thumbnails, and fixes the aspect ratio to the smaller value, whether it is width or height, centered. The result would then be placed in S3.

@mheppler mheppler self-assigned this Mar 24, 2020
@mheppler mheppler removed their assignment Mar 24, 2020
@mheppler
Copy link
Contributor

This issue was originally created to support the PR use dataset thumbnail if available #5621 which @qqmyers submitted for issue Use Dataset Thumbnail in Open Graph metadata #5641.

There are many thumbnail or preview image sizes we should support. The consensus (ref, ref, ref) for social media recommendations are 1200 x 1200 px square images, or 1200 x 630 px (1.9:1 aspect ratio) for landscape preview images.

The new mockups have thumbnails in the citation block of the dataset pg that are about 150 px, and the original thumbnail size was only 48 px.

With all these various size requirements, as @tainguyenbui suggests, we start by cranking out multiple sizes, 1200, 1024, 630, 450, 300, 150, 80, 48, and as we better define all the test cases we want to support, we can cut that number down.

To better support the larger sized thumbnails, we will want to improve the help messages and documentation for thumbnails, to better information users of image size requirements to support all these various sizes and use cases. Those efforts will be part of Improve thumbnails #6450.

@sergejzr
Copy link

Hello! Just to mention that 48x48 resolution for the thumbnails is way too small for modern displays. I would say, at least 200x200 should be possible. Also, SVGs are not accepted (that would solve all possible resolution problems)

@cmbz
Copy link

cmbz commented Sep 30, 2024

2024/09/30: @landreev @qqmyers @stevenwinship do you think we can close this given the recent work on thumbnails that has been completed?

@qqmyers
Copy link
Member

qqmyers commented Sep 30, 2024

I think #10152 is a better issue to keep open.

@cmbz
Copy link

cmbz commented Sep 30, 2024

2024/09/30: Closing in favor of #10152

@cmbz cmbz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants