add adaptive resizing to thumb image