Skip to content

Releases: simonihmig/responsive-image

@responsive-image/[email protected]

13 Nov 19:41
6ae7807

Choose a tag to compare

Patch Changes

  • #1890 276ce93 Thanks @simonihmig! - Fix dependency on tslib

    tslib must be a dependency, not devDependency, as the compiled code imports it.

@responsive-image/[email protected]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1855 9e85dec Thanks @simonihmig! - Fix loading state when image is loaded already

    When 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]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1790 8722eb7 Thanks @schiller-manuel! - Configure noExternal for server env

    Framework 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]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1855 9e85dec Thanks @simonihmig! - Fix loading state when image is loaded already

    When 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]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1855 9e85dec Thanks @simonihmig! - Fix loading state when image is loaded already

    When 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]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1855 9e85dec Thanks @simonihmig! - Fix loading state when image is loaded already

    When 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]

06 Nov 21:06
2eb800d

Choose a tag to compare

Patch Changes

  • #1855 9e85dec Thanks @simonihmig! - Fix loading state when image is loaded already

    When 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]

07 Oct 21:53
c03f233

Choose a tag to compare

Patch Changes

  • #1712 c97ca84 Thanks @simonihmig! - Force recreating the <img> element to show LQIP styles

    When changing the src argument 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 as background-image based styles). The <img> element is essentially a stateful element, which in this case is not playing in our favor.

    For dynamically changing src with 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]

07 Oct 21:53
c03f233

Choose a tag to compare

Patch Changes

  • #1712 c97ca84 Thanks @simonihmig! - Force recreating the <img> element to show LQIP styles

    When changing the src argument 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 as background-image based styles). The <img> element is essentially a stateful element, which in this case is not playing in our favor.

    For dynamically changing src with 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]

07 Oct 21:53
c03f233

Choose a tag to compare

Patch Changes

  • #1712 c97ca84 Thanks @simonihmig! - Force recreating the <img> element to show LQIP styles

    When changing the src argument 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 as background-image based styles). The <img> element is essentially a stateful element, which in this case is not playing in our favor.

    For dynamically changing src with 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.