Skip to content

Dependency on libwebp: How do you configure or build Pillow without libwebp support? #7428

Answered by homm
chandanbn asked this question in Q&A
Discussion options

You must be logged in to vote

it's a soft dependency. You can remove it from the default list of formats:

from PIL import Image
Image.init()  # This is required
Image.ID.remove('WEBP')
Image.open('space.webp')
>>> UnidentifiedImageError: cannot identify image file 'space.webp'

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@chandanbn
Comment options

@homm
Comment options

homm Sep 29, 2023
Collaborator

@chandanbn
Comment options

@homm
Comment options

homm Sep 29, 2023
Collaborator

Answer selected by radarhere
@ipmincubus1369
Comment options

@radarhere
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
4 participants