Switch detail pane entity image calculations

Display image as cover, unless the hidden area would be > 40%,
then switch to background-size: contain (but still prevent scaling
beyond 100% of original image) #226