changed the way red border draws round photo image, now waits for the element to render in order to do so.