poketo / poketo-reader

Web app for reading and following manga series
https://poketo.app
MIT License
34 stars 10 forks source link

Add smarter lazyloading image dimensions #35

Closed rosszurowski closed 5 years ago

rosszurowski commented 5 years ago

Previously, we assumed a static size for all images being loaded. This resulted in a bunch of relayout and page jumping because the default size rarely aligned with the actual image size.

This PR introduces a smarter method, where the most common image dimensions from the images that are already loaded gets used as the placeholder image size. In some quick testing, it seems to work quite well, even for all-over-the-place series like Shingeki no Kyojin.