Skip to content
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

image support #140

Open
MacroUniverse opened this issue Jul 29, 2021 · 10 comments
Open

image support #140

MacroUniverse opened this issue Jul 29, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@MacroUniverse
Copy link

Hi, will image be supported in hack.chat?

@marzavec marzavec added the enhancement New feature or request label Aug 2, 2021
@marzavec
Copy link
Member

marzavec commented Aug 2, 2021

Hi! There are two or three routes that can be taken when it comes to having images displayed in the client.

The first would be the more typical route of providing ui elements to allow a user to directly send an image to everyone in the channel. This would mean that the media is uploaded and stored by the server running the hack.chat instance. Not only does this option increase code complexity and server resource usage, it also places a new legal liability on the owner of the server. I cannot get behind this route at all.

The second is to allow the client to load and display 3rd party hosted images. This solves the previous options issues with resources and liability. However, it creates an issue with privacy. When the client requests the image, the user's IP would be exposed- there are plenty of public IP grabbers that provide image support. A way to combat this may be to have the server proxy the image, but that re-introduces the resource and liability issues. Another way would be to alert the user to this privacy issue, but allow them to take on the risk- which would be a lazy simple way to support images. This is still not ideal though.

The last option is essentially a hybrid of the first two; provide the ui elements to upload an image, but have the client convert the image into a data url, transmit that and allow the receiving ends to display it. This solves the privacy and liability issues, but uses greater server resources (compared to the typical setup of option one).

The TLDR is that this feature increases resource usage and risk. Realistically the best option would be to shunt resources to a 3rd party image host and alert the user to privacy risks.

@MacroUniverse
Copy link
Author

MacroUniverse commented Aug 3, 2021 via email

@marzavec
Copy link
Member

marzavec commented Aug 3, 2021

See option 3.

@MacroUniverse
Copy link
Author

MacroUniverse commented Aug 4, 2021 via email

@stcee
Copy link

stcee commented Jan 8, 2022

IPFS could be used for option 3

@0x24a
Copy link

0x24a commented May 1, 2023

i think hc should add more imghost whitelists, 99% imghost cannot be used in china :(

@marzavec
Copy link
Member

marzavec commented May 1, 2023

We can do that. Do you know of any Chinese image host that respects privacy and has ethical standards? Or, perhaps easier, one that is openly available to China?

@0x24a
Copy link

0x24a commented May 2, 2023

i.loli.net,s2.loli.net,s1.ax1x.com,s2.ax1x.com,z3.ax1x.com,s4.ax1x.com,i.postimg.cc

sm.ms imagehost,"路过图床",postimages
I think these imagehosts are great :D

@0x24a
Copy link

0x24a commented May 2, 2023

They all do not require an account and very respect privacy

@VVhitehead
Copy link

@marzavec

Or, perhaps easier, one that is openly available to China?

someone actually test this like fr fr, but I would recommend adding: dump.li. (has file expiry options, including 'never' and has Tor and I2P mirrors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants