zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.03k stars 217 forks source link

FR: Tiff file support #1476

Open gerroon opened 9 months ago

gerroon commented 9 months ago

Is your feature request related to a problem? Please describe. We can't load .tif files

Describe the solution you'd like It would be great if image file types like .tif are supported. This will be helpful for more artistic needs since .tif is a widespread format for non web use

Describe alternatives you've considered convert images to .jpg which is far from a decent solution/

zsviczian commented 9 months ago

I've tried that in the past. Unfortunately, it seems that browser support for tiff is limited. Adding the extension and mime type to the list of allowed files results in a processing error.

export const IMAGE_MIME_TYPES = {
  svg: "image/svg+xml",
  png: "image/png",
  jpg: "image/jpeg",
  gif: "image/gif",
  webp: "image/webp",
  bmp: "image/bmp",
  ico: "image/x-icon",
  avif: "image/avif",
  jfif: "image/jfif",
  tif: "image/tiff",
} as const;
gerroon commented 9 months ago

Do you think this is an Obsidian issue then?

zsviczian commented 9 months ago

No - This is a web issue. This is also why the feature is not implemented on Excalidraw.com

I am sure there is a way around it... but frankly, this does not rank high enough on my backlog to spend time researching and solving the topic just now.