I’m not sure if this is exactly what you’re looking for, but you might want to check out: get_attached_media() and wp_get_attachment_url().
I’m not sure if this is exactly what you’re looking for, but you might want to check out: get_attached_media() and wp_get_attachment_url().