# The order of the previous picture and the next picture is incorrect

**URL:** <https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093>\
**Category:** ℹ️ Support\
**Created:** [December 28, 2021, 4:57pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093 "2021-12-28T16:57:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shan](https://help.nextcloud.com/letter_avatar/shan/32/5_5575768a8748004e209b776fc1b2916d.png) [@shan](https://help.nextcloud.com/u/shan)\
**Post date:** [December 28, 2021, 4:57pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/1 "2021-12-28T16:57:09Z")

</div>

Nextcloud 23.0.0  
The Nextcloud in my Server and in the demo ([https://demo2.nextcloud.com](https://demo2.nextcloud.com)) have the same problem.

The pictures are sorted in reverse order according to the modified date:  
 ![捕获](https://help.nextcloud.com/uploads/default/original/3X/f/8/f8f51fa9abdbb2de9382a4fef4972155450295bf.jpeg)

I click one picture to preview,

 ![捕获2](https://help.nextcloud.com/uploads/default/original/3X/e/0/e01ff2abf11c58c7dd6329dc2a7e641d9fe52589.jpeg)

When I click the right button, it should display picture 4, but in fact it display picture 5.

Why the left and right buttons do not achieve the expected effect?

---

<div class="post-metadata">

**Author:** ![ashimv](https://help.nextcloud.com/letter_avatar/ashimv/32/5_5575768a8748004e209b776fc1b2916d.png) [@ashimv](https://help.nextcloud.com/u/ashimv)\
**Post date:** [November 6, 2022, 12:35pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/2 "2022-11-06T12:35:31Z")

</div>

I have the same problem. Did you maybe find a solution?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [November 6, 2022, 12:43pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/3 "2022-11-06T12:43:38Z")

</div>

> [@shan](#):
>
> The pictures are sorted in reverse order according to the modified date:

I think this is a coincidence. On my server they appear in alphabetical order, based on their file names.

---

<div class="post-metadata">

**Author:** ![ashimv](https://help.nextcloud.com/letter_avatar/ashimv/32/5_5575768a8748004e209b776fc1b2916d.png) [@ashimv](https://help.nextcloud.com/u/ashimv)\
**Post date:** [November 6, 2022, 1:24pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/4 "2022-11-06T13:24:49Z")

</div>

Yes, this is also my experience. Clicking “next” will take you to the photo that is next alphabetically, even when you have sorted the pictures on “modified”. Has this always been the case? And did I never notice before?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [November 6, 2022, 1:32pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/5 "2022-11-06T13:32:03Z")

</div>

> [@ashimv](#):
>
> Has this always been the case

Afaik, yes. But I’m not a 100% sure because most of my photos have the date and the time in their file names like this… IMG\_20200226\_095812, IMG\_20200226\_095822.jpg, IMG\_20200227\_172405 etc…

---

<div class="post-metadata">

**Author:** ![ashimv](https://help.nextcloud.com/letter_avatar/ashimv/32/5_5575768a8748004e209b776fc1b2916d.png) [@ashimv](https://help.nextcloud.com/u/ashimv)\
**Post date:** [November 6, 2022, 1:38pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/6 "2022-11-06T13:38:27Z")

</div>

Ah ok.

(Btw, if you go to the “photos” interface (app) and you navigate to the same folder, click a photo, and _then_ click “next”, you _do_ get the next photo on the basis of “sort modified”.)

---

<div class="post-metadata">

**Author:** ![shan](https://help.nextcloud.com/letter_avatar/shan/32/5_5575768a8748004e209b776fc1b2916d.png) [@shan](https://help.nextcloud.com/u/shan)\
**Post date:** [June 9, 2023, 3:00am UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/9 "2023-06-09T03:00:54Z")

</div>

update: same problem in Nextcloud 24

update: same problem in Nextcloud 32.0.0

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 2:36pm UTC](https://help.nextcloud.com/t/the-order-of-the-previous-picture-and-the-next-picture-is-incorrect/130093/10 "2024-12-14T14:36:22Z")

</div>


