Closed hayleycodes closed 5 years ago
custom html has already been written csfieldguide/utils/custom_converter_templates/image.html
cusom css has already been written as .img-container
in csfieldguide/static/scss/website.scss
but the images are still huge under certain circumnsances
csfieldguide/utils/custom_converter_templates/image.html
is an html file but is interpreted differently, so as far as I could find it doesn't allow JS of any formThis 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.
Current solution is to scale down the source images
This task involves two steps:
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:
compression-comparison.png
(540kb)compressed-jpeg.png
(ironically) (441kb)fruit-bowl-photo-with-canny-edge-detection.png
(215kb)time-capsule.png
(206kb)None of the images are in the MBs (like #512)
Closing this issue as I believe it has been addressed. Reopen if further action is needed
The pictures are currently HUGE