-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support uploading images #29
Comments
No, there’s no real technical reason except showing them in the preview rendered. It probably makes most sense to do what GH does and upload images into Markdown and just provide a link, but file hosting (rather than just text) is out of scope for this project imo. |
Would converting the image to SVG and embedding it in the file be within scope? |
Probably not, because I feel like the SVGs could be huge compared to the actual image file? after some thought, I think I am okay with supporting hosting images, but it would require a bit of work. I guess we could embed the image in sqlite, but its probably better to store it as-is and serve it from the folder location on disk. @adyanth any thoughts on this? I appreciate your input 🙏 |
The size would be large when using SVG. I haven't seen any pros/cons on storing images in the DB vs the filesystem to comment on which would be better. Storing images in a filesystem path (configurable) is good enough which may (in the future if needed) allow something like nginx serve the bulk static content if necessary. Even cache the content if needed. I would recommend having a separate endpoint for these content. Also, similar to how GitHub does it, would be better to generate a random filename (and strip metadata) for the images before saving it. |
I mean, is there some technical stuff I should take care if I remove the limit on the file type in the uploader component?
The text was updated successfully, but these errors were encountered: