P.S.: Perhaps it is easier to just include the date inside the filename, and get the date from the filename, although I also don’t know how to do that.
That will capture (hence the name ) the output of exiftag and will be assigned to the variable image_datetime, then you could use it with the date filter, if image_datetime is a date/time object.
Indeed, was going to recommend capture. You can chain filters in {{ }} but because you have a tag in {% %} you can’t send that to a filter. So then you capture the content of tag output as a variable and then use that as with a filter.
To keep your code light, you can make an includes file.