from PIL import Image b = Book.objects.get(title='Into the wild') image = Image.open(b.cover_pic.path) image.save(b.image.path,quality=20,optimize=True)