You're definitely on the right track. While <SITE_PHOTONUMBER> is in fact the total number of photos, it is not the unique ID number that is used to identify each photo. The tag we're looking for is <IMAGE_LAST_ID>. I tested it and it works. Thanks iaredatsun!