We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7b1663f + 9438a31 commit 5eba770Copy full SHA for 5eba770
src/app/content/views/Footer/index.tsx
@@ -250,7 +250,13 @@ const Footer: FC = () => {
250
const handleInjectImage = async (file: File) => {
251
try {
252
setInputLoading(true)
253
- const blob = await compressImage({ input: file, targetSize: 30 * 1024, outputType: 'image/webp' })
+
254
+ const blob = await compressImage({
255
+ input: file,
256
+ targetSize: 30 * 1024,
257
+ outputType: file.size > 30 * 1024 ? 'image/webp' : undefined
258
+ })
259
260
const base64 = await blobToBase64(blob)
261
const hash = nanoid()
262
const newMessage = `${message.slice(0, selectionEnd)}${message.slice(selectionEnd)}`
0 commit comments