Reimplemented the image slider

It now handles portrait pictures better.