with liquid you can filter/sort an array but any of its elements attribute that you want.
in your case you need to create datafile (in yml, csv or json) representing a collection of photos, and each photo should have a date
attribute (along with a name, src, ...).
then in the layout
that generate a caty
page you'll have some thing like:
{% assign sorted-photos = site.data.photos | sort: 'date' %}
<ul> <!-- list of sorted photos -->
{% for photo in photos %}
<li> <img src={{photo.src}} alt={{photo.name}}></li>
{% endfor %}
</ul>
the photos collection would be a photos.yml
file located in _data
directory with a structure similar to:
- src = assets/img/p1.jpg
date = 10-01-2017
name = cute cat
category = cats # if you need to filter by category ?
- src = assets/img/p2.jpg
date = 12-01-2017
name = grumpy cat-2
category = cats
- src = assets/img/p3.jpg
date = 10-11-2016
name = cool dog
category = dogs