-
Notifications
You must be signed in to change notification settings - Fork 391
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
feat: add r/docs/img_embed #3241
Conversation
Signed-off-by: moul <[email protected]>
I'm a bot that assists the Gno Core team in maintaining this repository. My role is to ensure that contributors understand and follow our guidelines, helping to streamline the development process. The following requirements must be fulfilled before a pull request can be merged. These requirements are defined in this configuration file. Automated Checks🟢 Maintainers must be able to edit this pull request (more info) Manual ChecksNo manual checks match this pull request. Debug
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
|
||
Here’s an example of embedding an image in a Gno realm: | ||
|
||
![Example Image](https://i.imgur.com/So4rBPB.jpeg)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a dev call, I thought we said that embedding an image from a random web site is a security risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jefft0, I don't remember this.
Our goal is to create a list of whitelisted domains for auto-preview. Imgur is, if I recall correctly, moderated. Therefore, Gnoweb can be updated to disable automatic previews for non-whitelisted domains while still allowing links to any URL, whether for images or other content.
Note: This example aims to discourage users from uploading all their files in base64 on the chain. Such cases should be very advanced and only relevant in rare situations. By default, image embedding or linking should be the preferred method for sharing assets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't wait for gnoweb refacto so we can add ipfs://
embed support :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will likely address all the bad practices I see everywhere by providing examples here. Here’s my shortlist:
- Base64 meme images (inefficiency)
- Writing JSON encoders (makes code hard to read, mixes concepts and targets)
- Creating top-level functions for everything instead of promoting
maketx run
I will write new examples soon and open issues so we can update the tools (e.g., gnoweb
).
Embedding an image. --------- Signed-off-by: moul <[email protected]>
Embedding an image. --------- Signed-off-by: moul <[email protected]>
Embedding an image. --------- Signed-off-by: moul <[email protected]>
Embedding an image. --------- Signed-off-by: moul <[email protected]>
Embedding an image.