rsnext/test/integration/image-component
Alex Castle 8066e423a7
Don't lazy-load already-loaded image in client-side transition (#26968)
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.
2021-07-07 17:51:16 +00:00
..
base-path Remove deprecated features (#25446) 2021-06-02 10:11:03 -05:00
basic Don't lazy-load already-loaded image in client-side transition (#26968) 2021-07-07 17:51:16 +00:00
custom-resolver Update next/image test (#20986) 2021-01-13 15:05:08 +00:00
default Don't emit duplicate image files (#26843) 2021-07-02 11:27:32 +00:00
noscript Fix next/image noscript src path with loaders (#24011) 2021-06-16 20:53:40 +00:00
svgo-webpack Omit svg static imports if custom webpack config is defined (#26281) 2021-06-18 00:40:22 +00:00
typescript Update to only add image import types when enabled (#26485) 2021-06-22 11:56:21 -05:00
typescript-style cache typechecking with incremental compilation (#24559) 2021-05-07 19:21:20 +02:00