added a check if an attachment is instance of an attachment type where we could get the original link to the photo