[3.8] Fix #883 Resize img accoring to device orientation