Piwigo-Android icon indicating copy to clipboard operation
Piwigo-Android copied to clipboard

smaller thumbmails

Open lbesnard opened this issue 6 years ago • 4 comments

By installing the latest beta via android-studio, I noticed the debug urls for the thumbnails use the small version of the pictures. Such as http://***/piwigo/i.php?/upload/2019/01/30/20190130083950-c3ac7346-sm.jpg

This works fine, but the loading could be much faster if using the smallest version available http://10.1.1.198/piwigo/i.php?/upload/2019/01/30/20190130083950-c3ac7346-2s.jpg

The difference is using 2s instead of sm

In my case, I have used the xsmall keyword. I modified the following :

1) adding

    @SerializedName("xsmall") public Derivative xsmall;

to

https://github.com/Piwigo/Piwigo-Android/blob/b3cb7208b5cf460c78a2ba82bf1e5f8b86f3931e/app/src/main/java/org/piwigo/io/model/Derivatives.java#L24

2) Modifying

            imageurl = image.derivatives.xsmall.url;

in https://github.com/Piwigo/Piwigo-Android/blob/28f0d87611c66bce50a7343724d3791cf4d79197/app/src/main/java/org/piwigo/ui/main/AlbumsViewModel.java#L181

Unfortunately, the tiny and _xxsmall options don't seem to work.

It worked fine on my end. But I'm not a android dev

lbesnard avatar Jan 30 '19 02:01 lbesnard

The list of available sizes depends on the server settings (in Configuration / Photo sizes). Only the Square, Thumbnail and Medium file sizes are always available so it might be worth providing an option for choosing other sizes and adopt the Thumbnail size by default as does the iOS app.

EddyLB avatar Jan 30 '19 06:01 EddyLB

Today @voriondev changed already to xsmall, but we shall make it dynamic, depending on the available sizes on the server.

ramack avatar Sep 29 '19 20:09 ramack

We did set the thumbnail quality to medium to avoid downloading 2 different qualities for a photo as our "local repository" system is not implemented yet in any way, we are just using the Picasso Caching System.

Let's move that milestone to 1.2.0

Valou447 avatar Oct 04 '19 08:10 Valou447

"download size" is configurable already in Release 1.1, but "all" sizes are selectable, not only those which are supported by the configured gallery.

So we should adjust this to constrain the list of available options and after implementing #207 we shall store the setting for download size per account, in SettingsActivity/Fragment. List of available sizes can be read via pwg.session.getStatus.

ramack avatar Nov 24 '19 22:11 ramack