Topic: Photos not sorted correctly using Wordpress plugin en Flickr

Hey,

I have a flickr album with 142 photos.
I would like to sort them by "date taken asc" in my wordpress plugin.
What I see is that the photos are sorted correctly in the beginning, but after some 30 photos it seems to be in randomly order.
I've checked the date taken values in flickr and these dates seem to be ok.
From image 32 on it's going wrong.

Do I have to set another configuration parameter to solve this problem?
I'm not using a set in flickr.

My website with this album is http://www.javadu.be/2017/07/03/hillers … sauerland/

Regards,
Mark Jansen

Re: Photos not sorted correctly using Wordpress plugin en Flickr

Juicebox (whether the gallery is created by the WordPress plugin or any other method) just makes a request to Flickr's API (using the Flickr configuration option values) and displays the images in the order in which they are returned by Flickr.

If you go to the Flickr API Explorer (bypassing Juicebox completely) and enter the same details you use for your gallery:

user_id: 142825215@N06
tags: Hillershausen
sort: date-taken-asc

... you'll see the images returned in the same order as they are displayed in the gallery. All the sorting is done at Flickr's end.

If the images are not returned in the correct DATE-TAKEN-ASC order, then maybe you can log into your Flickr account and check (and change if necessary) the metadata associated with the images (to ensure that the order is correct).

Otherwise, you could perhaps change the 'date uploaded' for each image (so that they are in the order you want) and then display the images using DATE-POSTED-ASC, as noted in this FAQ:
How do I change the order of images from Flickr?

If you think there's genuinely a problem with the order in which Flickr is sorting your images, then you might also like to post in the Flickr API forum.

I hope this points you in the right direction.

Re: Photos not sorted correctly using Wordpress plugin en Flickr

Hello,
I've checked manually all dates in flickr (uploaded en taken) and sorting in flickr is ok.
When I set sorting with DATE-POSTED-ASC for Juicebox, the sorting is completely wrong.
When I set sorting with DATE-TAKEN-ASC for Juicebox, the sorting is partially good.
And I'm sure that in flickr everything is sorted like it should be.
So what's coming out of the API call seems to be ok.

Regards,
Mark Jansen

Re: Photos not sorted correctly using Wordpress plugin en Flickr

I have run some tests and have found the following.

(1) Juicebox-Pro sets flickrTagMode to ALL by default. The Flickr API Explorer sets 'tag_mode' to 'any' by default.

(2) Juicebox-Pro sends 'original_format' as a Flickr API 'extra' parameter.

(3) Juicebox-Pro sets flickrImageCount to 50 by default (the same as the image limit within Juicebox-Lite). The Flickr API Explorer sets 'per_page' to '100' by default.

(4) The Juicebox-Pro flickrImageCount / Flickr API 'per-page' setting seems to make a difference to the image order.

#1 and #2 will likely not make a difference to your gallery but I notice that changing the flickrImageCount can affect the order of images.

For example, with the Juicebox-Pro flickrImageCount / Flickr API 'per-page' setting set to 500 (to cover all images in your Flickr selection), note the 4th and 5th images in the gallery / API results.
Now, reduce the Juicebox-Pro flickrImageCount / Flickr API 'per-page' setting set to 100 (less than the total number of Flickr images in your selection). The 4th and 5th images are still both present in the gallery / API results but their positions are swapped around (even though the sort order has not changed). Even though fewer images (100) will be returned by Flickr, I would expect the order of images in the 100 test to be the same as the order of these images within the 500 test but this does not seem to be the case (and only Flickr will be able to explain why as I do not know the algorithms that Flickr's API uses).

It should be noted that this happens in both Juicebox-Pro and with the Flickr API Explorer (independent of Juicebox-Pro).
When the Flickr API Explorer settings are identical to those used by Juicebox-Pro, the results are also identical.

If the order of images returned by Flickr (when flickrImageCount / Flickr API 'per-page' is set to less than the number of images you want to display in your gallery) is the order you'd like to use, then I'm not sure what you can do (as you'll need to set flickrImageCount to the number of images you want to display (which might result in an order you do not want).

The only thing I can think of is that maybe the images have similar but not identical time data (same day, same hour, maybe even same minute) and that Flickr's API builds an initial array of images images in different ways (depending on search criteria) and then sorts them by time but perhaps not going down to second or millisecond accuracy so some images with similar but not identical time data might end up in different orders. I do not know if this is what is happening (it seems unlikely) but it's the only thing I can think of at the moment which might explain the results I am seeing.

Maybe refreshing (editing or changing) the metadata stored within your images within the Flickr interface will result in more consistent and predictable behavior but Juicebox can only send a request to Flickr (via the Flickr API) and display whatever Flickr returns. It might be a long process but it might ultimately be the solution to the problem. (There is no way to know without trying.)

If you want to try to understand exactly why Flickr returns images in different orders depending on their API's 'per-page' value (even though the sort order does not change), then you will probably need to ask Flickr themselves in their API support forum.

I don't know if this will help but it's as much as I've been able to determine thought my own testing.

Re: Photos not sorted correctly using Wordpress plugin en Flickr

Thanks for this very detailed explanation.
This is indeed my first gallery with a lot of photos.
Even when I change de dates in Flickr (each photo with a different timestamp with interval of 1 second) it desn't work.
Now I've moved my photos to the Nextgen gallery, but showing them with Juicebox.
This is a work around that's working.
Later this week I'll try to avoid this work around, but still don't now how.

Regards
Mark Jansen

Re: Photos not sorted correctly using Wordpress plugin en Flickr

Now I've moved my photos to the Nextgen gallery, but showing them with Juicebox.
This is a work around that's working.

I'm glad that you've found a suitable workaround (although it is unfortunate that the Flickr sorting is not working for you as expected).

Here are a couple of alternative workarounds:

(1) Try creating a Flickr set from your images. Flickr sets are always returned in the order specified on the Flickr set page. (If you specify a flickrSetId, then the flickrSort option will not be used.) This should hopefully allow you to continue to use Flickr as the image source. Please see this FAQ for information on how to order images in a Flickr set: How do I change the order of images in a Flickr Photo Set?

(2) You could use the WordPress Media Library as the image source. WP-Juicebox displays all images uploaded to the post containing the gallery so you could upload the images (via the 'Add Media' button when editing the post). You can then go to 'Uploaded to this post' (within the media window) and drag and drop the thumbnails into the order you want them to be displayed in your gallery. (WP-Juicebox displays images in the order in which they appear in the 'Uploaded to this post' section.)

Re: Photos not sorted correctly using Wordpress plugin en Flickr

Hey,

I found a solution just by setting flickrSetID to the album Id of flickr.
With this option sorting of flickr will be used.
No need to use a set.

Thanks for helping me to solve the problem.

Regards,
Mark

Re: Photos not sorted correctly using Wordpress plugin en Flickr

I'm glad to hear that setting a flickrSetId has proved to be a suitable workaround for you.
Thank you for letting me know.