obsidian-image-converter icon indicating copy to clipboard operation
obsidian-image-converter copied to clipboard

FR: Support .avif image style

Open YIRU69 opened this issue 1 year ago • 4 comments

On obsidian version 15.3/ Added support for embedded .avif files.

YIRU69 avatar Dec 26 '23 08:12 YIRU69

+1

Facni avatar Mar 13 '24 16:03 Facni

I really want it.

sdegongzuo avatar Mar 29 '24 17:03 sdegongzuo

Obsidian 1.6.7, android, Windows 10: Same wish here.

merlinuwe avatar Aug 14 '24 18:08 merlinuwe

Agree, this would be a nice addition.

Comprehensive-Jason avatar Aug 15 '24 03:08 Comprehensive-Jason

+1 missing this

luisfos avatar Nov 15 '24 00:11 luisfos

This would be awesome. AVIF is much better than WebP, the current "best" format on the list for this plugin!

theJayTea avatar Feb 03 '25 19:02 theJayTea

+1

Looking at the code it seems that it uses plain canvas encoder:

  • https://github.com/xRyul/obsidian-image-converter/blob/90cc5e4ae26ba31c27dbeebcb85b248657e3b6ae/src/ImageProcessor.ts#L418C38-L418C67

It seems that it is not going to be supported:

  • https://issues.chromium.org/issues/40848792 , https://stackoverflow.com/questions/61206083/create-image-from-canvas-with-avif-image-format

But it would be still possible by using a WASM-based encoder:

  • https://www.npmjs.com/package/@saschazar/wasm-avif

2.1 MB -> https://www.npmjs.com/package/@saschazar/wasm-avif?activeTab=code maybe it could be resized to just include the encoder and optimize it a bit further? Maybe an optional plugin? Would it be possible to download and cache the .wasm file?

soywiz avatar Feb 06 '25 11:02 soywiz

Thanks @xRyul ! 🎊👏

soywiz avatar Feb 20 '25 15:02 soywiz