[API] thumbnail too small for hdpi screens #394

Closed
opened 2026-10-04 23:56:22 +02:00 by adam · 4 comments
Owner

Here is what @Philio told me yesterday:

Wanted to get your thoughts on loading the album images. The thumbnail URL that's returned by pwg.categories.getList is very small and of unacceptable quality for a high resolution (~500 ppi) flagship Android phone. I see that I could use the representative_picture_id to then call pwg.images.getInfo and get a better image URL (also gives the ability to make a device specific selection) and finally download the image. Slightly concerned that this might end up in quite a few HTTP requests and could be a bit slow in certain network conditions. Is there a simpler way that I could perhaps do this that I've missed?

So, pwg.categories.getList returns the "thumb" size in output field "tn_url". On such screens, it would certainly be better to use the XS or S size.

@modus75 and @mistic100 what do you think of adding an input parameter thumbnail_size (same possible values as pwg.getMissingDerivatives::types (but only a single values) ie square,thumb,2small, xsmall, small,medium,large,xlarge,xxlarge

Here is what @Philio told me yesterday: > Wanted to get your thoughts on loading the album images. The thumbnail URL that's returned by pwg.categories.getList is very small and of unacceptable quality for a high resolution (~500 ppi) flagship Android phone. I see that I could use the representative_picture_id to then call pwg.images.getInfo and get a better image URL (also gives the ability to make a device specific selection) and finally download the image. Slightly concerned that this might end up in quite a few HTTP requests and could be a bit slow in certain network conditions. Is there a simpler way that I could perhaps do this that I've missed? So, pwg.categories.getList returns the "thumb" size in output field "tn_url". On such screens, it would certainly be better to use the XS or S size. @modus75 and @mistic100 what do you think of adding an input parameter thumbnail_size (same possible values as pwg.getMissingDerivatives::types (but only a single values) ie square,thumb,2small, xsmall, small,medium,large,xlarge,xxlarge <!-- github-sync-id:129714987 -->
adam closed this issue 2026-10-04 23:56:22 +02:00
Author
Owner

good idea ...

good idea ... <!-- github-comment-id:176665403 -->
Author
Owner

Thanks @plegall I'll keep an eye out for updates. I've implemented it by iterating the list for now and I would think it would make sense to keep this in for better compatibility with older versions, once 2.8 is released. I think it's worth the extra requests personally, here is "thumb" vs "large" on a Nexus 6P (2560x1440 xxxdpi) for comparison:

screenshot_20160203-003216

screenshot_20160203-003407

Once you've added this feature if you have a 2.8 test gallery on a public URL that you're able to share with me that would also be handy!

Thanks @plegall I'll keep an eye out for updates. I've implemented it by iterating the list for now and I would think it would make sense to keep this in for better compatibility with older versions, once 2.8 is released. I think it's worth the extra requests personally, here is "thumb" vs "large" on a Nexus 6P (2560x1440 xxxdpi) for comparison: ![screenshot_20160203-003216](https://cloud.githubusercontent.com/assets/237850/12769451/ef04a212-ca0f-11e5-9431-6bdcd2ba3aae.png) ![screenshot_20160203-003407](https://cloud.githubusercontent.com/assets/237850/12769456/f5ed1b68-ca0f-11e5-8b8e-51d5606cc420.png) Once you've added this feature if you have a 2.8 test gallery on a public URL that you're able to share with me that would also be handy! <!-- github-comment-id:178924579 -->
Author
Owner

@Philio you can try on http://piwigo.us/beta/philb (you should have received your credentials by email)

@Philio you can try on http://piwigo.us/beta/philb (you should have received your credentials by email) <!-- github-comment-id:179119441 -->
Author
Owner

Thanks @plegall that works :)

Thanks @plegall that works :) <!-- github-comment-id:179435731 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#394