-
Notifications
You must be signed in to change notification settings - Fork 492
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
Comments
|
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.
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. |
@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. |
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. |
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. |
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) |
2024/09/30: @landreev @qqmyers @stevenwinship do you think we can close this given the recent work on thumbnails that has been completed? |
I think #10152 is a better issue to keep open. |
2024/09/30: Closing in favor of #10152 |
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.
The text was updated successfully, but these errors were encountered: