Forum Discussion
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?
10 Replies
- MohNaveedCommunity 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!
- PaulMcEwanCommunity Member
If you want to get a bit more technical, you could research inline SVG paths.
- Deleted user
I’ve been experimenting with a quick workaround that’s worked well for me, using Rise as an image host for the courses it helps me to author. If you create a course (for example, “Assets”), upload your images, and copy the image URL, you can then reference that link in your custom code block.
I used this approach here - https://rise.articulate.com/share/t30zNIUzAGahxWsG_3el532Y2hjdBPkP#/lessons/80kREZ0gtpB5DTSkDvusaRekU_OChGLs
- ValeriaPleszowsCommunity Member
Thanks so much for this solution! I wonder if I should publish the 'Assets' course anywhere, or just by creating it in Rise can take the URL from the image to reuse it in another course? Is the editing URL the one to copy, or should it be in preview mode to take it?
Sorry for so many questions :) - ErinJune-1ef743Community Member
This is amazing Daniel, thank you for sharing. I am assuming this way is only if the eLearning course is going to be published as HTML, not as SCORM 2004?
- John_ReddingerCommunity Member
Great idea, thanks!
- John_ReddingerCommunity Member
Either that or upload your files in a .zip folder. I was thinking about this the other day, wouldn't it be great if Rise had a media library similar to Storyline, but you could store your image files there and call them with the code?
Probably a long shot, but it would make things so easy!
- Kmcclure76Community Member
and that would be the way to embed video into your projects as well.
- MadelayneCommunity Member
Hi Claire, in order to not be linking somewhere else you would need to upload your html file and images in a .zip