Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

This demonstrates setting image URLs dynamically based on the NetworkInformation API's connection type.

Notifications You must be signed in to change notification settings

mikaelvesavuori/demo-connection-responsive-images

Repository files navigation

Demo: Connection-Responsive Images

This demonstrates setting image URLs dynamically based on the NetworkInformation API's connection type. This pattern should be combined with a modern Picture element for responsive images, thus also looking at the viewport size.

Safari 11.1.2 will not currently support this, but Chrome 68 will. Safari will fall back to a medium quality image and Chrome will use a progressively higher quality image, based on connection speed. To emulate this effect, use the Network panel to throttle the speed.

About

This demonstrates setting image URLs dynamically based on the NetworkInformation API's connection type.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages