Skip to content

Commit f471272

Browse files
committed
Remove .webp from supported extensions in optimize_image.py
WebP files are already optimized. Accepting them as input caused with_suffix('.webp') to resolve to the same path, overwriting the original and making the size comparison incorrect. Fixes review feedback on PR #106.
1 parent bae3ba2 commit f471272

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/optimize_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030
sys.exit(1)
3131

32-
SUPPORTED_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".tif", ".webp"}
32+
SUPPORTED_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".tif"}
3333

3434

3535
def optimize_image(input_path: Path, *, quality: int, max_width: int) -> Path | None:

0 commit comments

Comments
 (0)