kalkatfyodor
When Phoenix can push html on the fly through websockets I thought it could be possible to somewhat obfuscate the image → perhaps send as part of JS canvas or something?
My point is that I want to hide the original URL and perhaps transfer it into JavaScript or something? perhaps there is a specific JavaScript library directly for this purpose?
I don’t want those images to be downloadable, also the quality and dimensions could be low, I don’t care.
The point is to bypass the img html tag or/and perhaps CSS background attribute somehow and still display an image.
The idea is to include even a watermark in the process without using external libraries that generate images like imagemagick etc.
Can Phoenix achieve something like that? Either by itself or by using some additional JS library?
Trending in Discussions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hauleth
Let me introduce you to the feature of screenshot
You will either need to do it in the FE (then user that really want to extract “raw” image can just capture the image on the wire) or you need some image manipulation library on the backend.
And yes, it is possible, however that:
<canvas>However all of that still can be circumvented by party with enough knowledge if you will send the image through unchanged over the wire.
MRdotB
Hello this comic website use a system to hide image. Canvas + webcrypto(SubtleCrypto: encrypt() method - Web APIs | MDN). They never send image directly but a key and a an encrypted image. Then it get decrypted by the js client using aes cbc.
Still it does not prevent screenshoot.
Code to decrypt image
https://github.com/mrdotb/uu3cXJMu/blob/master/aes-cbc-file.js
kalkatfyodor
Wow, that’s cool. I will explore it. Thank you.
derek-zhou
You can also use a data url that embed the img inside the html itself. You can use Phoenix to do this, no js involved.
Obviously you don’t want to send very large img this way.