Generate thumb of image.