cyclestreets / cyclescape

Cyclescape - cycle campaign group toolkit
https://www.cyclescape.org/
MIT License
33 stars 15 forks source link

Image sizes needed in thread page, to speed up move to latest #991

Open mvl22 opened 3 years ago

mvl22 commented 3 years ago

The feature that drops the user down to their last read post I believe depends on the jQuery setting the position based on the eventual layout.

However, it cannot determine this until every image is loaded. As a result, it can take a very long time to trigger.

Currently, the images in the thread do not have height/width attributes added to the image tag. I think adding this may significantly improve the situation. (I might be wrong.)

Presumably we already know the width, and the server could easily calculate the height as it can read the original image and scale that number with the width.