Telegram to send whatever latest JPG in a folder, possible?

is there anyway for me to have Telegram send the latest JPG file from a folder? if so what does the code look like here?

i use camera.snapshot to save photos from the RTSP cam to this folder “\\media” all of my HA config is in this folder “\\config”