Skip to content

Commit 509b8e9

Browse files
Copilotmikebarkmin
andcommitted
Add WebP support to allowed image file types
Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
1 parent c114aa9 commit 509b8e9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/learningmap/src/EditorDrawerImageContent.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function EditorDrawerImageContent({ localNode, handleFieldChange, languag
9696
};
9797
reader.readAsDataURL(file);
9898
} else {
99-
// Compress JPEG and PNG images
99+
// Compress JPEG, PNG, and WebP images
100100
const compressedDataUrl = await compressImage(file);
101101
handleFieldChange("data", compressedDataUrl);
102102
}
@@ -116,10 +116,10 @@ export function EditorDrawerImageContent({ localNode, handleFieldChange, languag
116116
return (
117117
<div className="panel-content">
118118
<div className="form-group">
119-
<label>{t.image} (JPG, PNG, SVG)</label>
119+
<label>{t.image} (JPG, PNG, WebP, SVG)</label>
120120
<input
121121
type="file"
122-
accept="image/png,image/jpeg,image/svg+xml"
122+
accept="image/png,image/jpeg,image/webp,image/svg+xml"
123123
onChange={handleFileChange}
124124
/>
125125
</div>

0 commit comments

Comments
 (0)