resize modal to fit photos