8066e423a7
fixes #19074 This change disables image lazy-loading when both of the following are true: 1) A image is being rendered following a client-side page transition 2) The image has been previously loaded during this session. Before this change, all images with lazy-loading enabled have a visible flicker during client-side page transitions, even though they're already loaded. With this change, there's are two performance risks: 1) There's a chance that some offscreen images will have lazy-loading disabled unnecessarily because they were previously loaded. I think the performance hit here is pretty negligible and the situation is unlikely to come up very often. 2) There's a chance a different-sized version of the image will be selected by the browser, but lazy-loading will be disabled anyway. This seems even more unlikely to me, and anyway the performance hit from a stray un-lazy-loaded image (on a client-side transition) is very minor. In both cases, I think the performance risk is outweighed by the UX improvement of getting rid of the image flicker on page transition. |
||
---|---|---|
.. | ||
base-path | ||
basic | ||
custom-resolver | ||
default | ||
noscript | ||
svgo-webpack | ||
typescript | ||
typescript-style |