loading

Adding Images| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How to add and reference images in your pages and cards
  • How to add static files on your site

Adding Images

You might want to add custom imagery for the standard icons on your site: for example, the search bar icon, the title bar icons, or icons that appear on your cards.

In order to do this, you’ll need to add the images to your site so that they can be referenced.

  1. Upload an image file to your /static/assets/images folder. Your images will have a path of /static/assets/images/filename.extension. searchbar icon

  2. Reference the image with the following structure static/assets/images/filename.extension. You can use this wherever the library is expecting an image URL. Below is an example of referencing a custom icon replacing the Search Bar magnifying glass.

Code

"SearchBar": {
  "placeholderText": "Search", // The placeholder text in the answers search bar
  "customIconUrl": "static/assets/images/magnifying_glass.svg"
}

Result searchbar icon

Note - you must place images in the specific folder path (static/assets/images), otherwise they will not be accessible for use on your site.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    True or False: You can add custom images to your Answers experience.

    Error Success Question 2 of 2

    What folder do images need to live in?

    Wahoo - you did it! 🙌

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Splash Loading