Forum Discussion
ClaireShanley-2
3 months agoCommunity Member
Suggestions on how to work with images
I'm enjoying testing the new Code Blocks!
If we want to include an image in our block is the only way to link it through to a hosted or image available on the web?
MohNaveed
18 days agoCommunity Member
Hi everyone this is my first post 😃I was also struggling with this issues but managed to resolve it ok, and thought I'd make a short guide how to do it.
- Copy the HTML code from an existing example or vibe code it.
- Create a folder on your computer and place your downloaded images into it
- Change image paths from absolute to relative. This is a nice short guide explaining what this means: Mastering HTML img src Local File: A Simple Guide. Typically this means code like
<img src="./exampleimage.jpg">
- Export your code as index.html and save it to the same folder as the images
- Create a zip file with the images and html file
- upload this to your rise project using "code" and "upload project" from the block library.
Hope this helps!