WordPress / wporg-theme-directory

15 stars 6 forks source link

Theme patterns block: Only load visible images at first #42

Closed ryelle closed 3 months ago

ryelle commented 4 months ago

Due to the way the screenshot block works, the hidden images are also requested when the page loads. This creates extra request load when these images are not even visible yet.

To reproduce

There are only 14 visible screenshots (8 style variations + 6 patterns), it should not be loading all 38 pattern screenshots.

ryelle commented 3 months ago

Fixed in https://github.com/WordPress/wporg-theme-directory/commit/4a1aae9e9d3d4cf926e58031fad9890170373dc3