In this paper, we propose an efficient method for learning local image descriptor and its inversion function using a variational autoencoder (VAE). We design a loss function of the VAE specifically for this purpose, which, on one hand, incentivises the similarities between input patches to be preserved in latent space, and on the other hand, ensures good reconstruction of the patches from their encodings in latent space. Our proposed descriptor demonstrates better patch retrieval compared to the reference autoencoder-based local image descriptor, and also shows improved reconstruction of patches from their encodings.