hack4impact-uiuc / 7000-languages

Helping Indigenous communities around the world teach, learn and sustain their languages
GNU General Public License v3.0
12 stars 2 forks source link

Decrease Image Load Time #175

Closed ashayp22 closed 2 years ago

ashayp22 commented 2 years ago

What is the problem?

Images take too long to load on the Lesson Page. This is because images load every time the user visits that page, instead of loading images once and saving a path to the locally saved image for future use. For more context, take a look at client/pages/LessonHome.

Some solutions

Getting started

  1. Think about which solution you want to implement.
  2. Update the logic in client/pages/LessonHome to load images only when needed.

Resources

Extension of this issue Once we figure out how to load images only when needed, we can apply this to the audio recordings. Take a look at getAudio() in client/components/LanguageHome. We should only get audio files from the API if they don't already exist on the client-side.