thumber: change image type by target path extension, load image before resizing