Releases: simonihmig/responsive-image
@responsive-image/[email protected]
Patch Changes
-
#1890
276ce93Thanks @simonihmig! - Fix dependency ontslibtslibmust be a dependency, not devDependency, as the compiled code imports it.
@responsive-image/[email protected]
Patch Changes
-
#1855
9e85decThanks @simonihmig! - Fix loading state when image is loaded alreadyWhen the image was already loaded when the component would render initially, the load event would get missed and so some optional LQIP styles (background image) would not get removed properly. This situation can easily happen in a SSR setup.
In most cases (opaque images) a user wouldn't see this, but with partially transparent images the LQIP would shine through.
@responsive-image/[email protected]
Patch Changes
-
#1790
8722eb7Thanks @schiller-manuel! - ConfigurenoExternalfor server envFramework package use Vite features, specifically CSS imports, that cannot directly run in node.js in server environments (SSR), so let Vite bundle them.
@responsive-image/[email protected]
Patch Changes
-
#1855
9e85decThanks @simonihmig! - Fix loading state when image is loaded alreadyWhen the image was already loaded when the component would render initially, the load event would get missed and so some optional LQIP styles (background image) would not get removed properly. This situation can easily happen in a SSR setup.
In most cases (opaque images) a user wouldn't see this, but with partially transparent images the LQIP would shine through.
@responsive-image/[email protected]
Patch Changes
-
#1855
9e85decThanks @simonihmig! - Fix loading state when image is loaded alreadyWhen the image was already loaded when the component would render initially, the load event would get missed and so some optional LQIP styles (background image) would not get removed properly. This situation can easily happen in a SSR setup.
In most cases (opaque images) a user wouldn't see this, but with partially transparent images the LQIP would shine through.
@responsive-image/[email protected]
Patch Changes
-
#1855
9e85decThanks @simonihmig! - Fix loading state when image is loaded alreadyWhen the image was already loaded when the component would render initially, the load event would get missed and so some optional LQIP styles (background image) would not get removed properly. This situation can easily happen in a SSR setup.
In most cases (opaque images) a user wouldn't see this, but with partially transparent images the LQIP would shine through.
@responsive-image/[email protected]
Patch Changes
-
#1855
9e85decThanks @simonihmig! - Fix loading state when image is loaded alreadyWhen the image was already loaded when the component would render initially, the load event would get missed and so some optional LQIP styles (background image) would not get removed properly. This situation can easily happen in a SSR setup.
In most cases (opaque images) a user wouldn't see this, but with partially transparent images the LQIP would shine through.
@responsive-image/[email protected]
Patch Changes
-
#1712
c97ca84Thanks @simonihmig! - Force recreating the<img>element to show LQIP stylesWhen changing the
srcargument dynamically and LQIP styles are being used, the<img>element will be recreated instead of reusing the existing DOM node. Otherwise LQIP styles for the new image would not be visisble, as the browser would continue showing the old (already loaded) image while the new one is loading, hiding the LQIP preview (implemented asbackground-imagebased styles). The<img>element is essentially a stateful element, which in this case is not playing in our favor.For dynamically changing
srcwith image data that does not have LQIP styles, the problem does not apply and therefore nothing changes: re-rendering will continue to reuse the existing DOM element, as this is more efficient.
@responsive-image/[email protected]
Patch Changes
-
#1712
c97ca84Thanks @simonihmig! - Force recreating the<img>element to show LQIP stylesWhen changing the
srcargument dynamically and LQIP styles are being used, the<img>element will be recreated instead of reusing the existing DOM node. Otherwise LQIP styles for the new image would not be visisble, as the browser would continue showing the old (already loaded) image while the new one is loading, hiding the LQIP preview (implemented asbackground-imagebased styles). The<img>element is essentially a stateful element, which in this case is not playing in our favor.For dynamically changing
srcwith image data that does not have LQIP styles, the problem does not apply and therefore nothing changes: re-rendering will continue to reuse the existing DOM element, as this is more efficient.
@responsive-image/[email protected]
Patch Changes
-
#1712
c97ca84Thanks @simonihmig! - Force recreating the<img>element to show LQIP stylesWhen changing the
srcargument dynamically and LQIP styles are being used, the<img>element will be recreated instead of reusing the existing DOM node. Otherwise LQIP styles for the new image would not be visisble, as the browser would continue showing the old (already loaded) image while the new one is loading, hiding the LQIP preview (implemented asbackground-imagebased styles). The<img>element is essentially a stateful element, which in this case is not playing in our favor.For dynamically changing
srcwith image data that does not have LQIP styles, the problem does not apply and therefore nothing changes: re-rendering will continue to reuse the existing DOM element, as this is more efficient.