diff --git a/PIL/WebPImagePlugin.py b/PIL/WebPImagePlugin.py index 5492f6641..628ac7ff6 100644 --- a/PIL/WebPImagePlugin.py +++ b/PIL/WebPImagePlugin.py @@ -4,7 +4,7 @@ from io import BytesIO import _webp def _accept(prefix): - return prefix[:4] == "RIFF" and prefix[8:16] == "WEBPVP8 " + return prefix[:4] == b"RIFF" and prefix[8:16] == b"WEBPVP8 " class WebPImageFile(ImageFile.ImageFile):