uccser / cs-field-guide

A free online interactive resource/textbook for high school students learning about computer science.
https://www.csfieldguide.org.nz
MIT License
348 stars 75 forks source link

Some images are too large #454

Closed hayleycodes closed 5 years ago

hayleycodes commented 7 years ago

The pictures are currently HUGE

eAlasdair commented 5 years ago

custom html has already been written csfieldguide/utils/custom_converter_templates/image.html

eAlasdair commented 5 years ago

cusom css has already been written as .img-container in csfieldguide/static/scss/website.scss but the images are still huge under certain circumnsances

eAlasdair commented 5 years ago
JackMorganNZ commented 5 years ago

This was a topic we spent a lot of time on deciding how to solve for CS Unplugged, I can share our approaches when I return to work.

  • As far as I know, that can't be done in css

If I understand what you are asking for correctly, this can be done with CSS media queries.

eAlasdair commented 5 years ago

Current solution is to scale down the source images

JackMorganNZ commented 5 years ago

This task involves two steps:

eAlasdair commented 5 years ago

I checked all images in the static/img folder (this doesn't include images within individual interactives) and only the top 4 largest are above 200kb:

None of the images are in the MBs (like #512)

eAlasdair commented 5 years ago

Closing this issue as I believe it has been addressed. Reopen if further action is needed