Prevent swiping from the first and last photos
Resize image to fit