jupyter_server icon indicating copy to clipboard operation
jupyter_server copied to clipboard

Add support for custom MIME types

Open alec-kr opened this issue 3 years ago • 1 comments

Problem

Support for webp images was recently added in JupyterLab. (View the PR: jupyterlab/jupyterlab#13066)

However, it was noted by @fcollonval here, that this mimetype is not supported in the Python mimetypes library used in Jupyter Server, but it is set to be released in Python 3.11.

Proposed Solution

I noticed that mimetypes.add_type('image/webp', '.webp') seems to solve this issue, by adding a custom webp mimetype. However, I am not sure where this code snippet should be implemented. I am looking for some advice, since I would like to work on this issue. I was also told that @Zsailer may be able to assist me with this.

Links

JupyterLab PR that added webp support: jupyterlab/jupyterlab#13066 cpython PR that adds webp image format: python/cpython#29259 @fcollonval's comment describing the issue

alec-kr avatar Sep 10 '22 01:09 alec-kr

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

welcome[bot] avatar Sep 10 '22 01:09 welcome[bot]