Skip to content

JavaScript library to enable dynamic change of image source based on <img> element width change.

License

Notifications You must be signed in to change notification settings

jockbert/js-dynamic-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Image

JavaScript library to enable dynamic resolution change and delayed load until image is in browser view port. The change of image resolution is based on <img> element width change.

A usage scenario is to only load scaled down versions of large photos on devices with small screens, to save time and bandwidth. Another usage scenario is to delay the loading of images until visible in browser view port.

For a small width area a small image is loaded, such as e.g. 100 pixels wide version:

Small image

For a wider area a larger image is loaded, such as e.g. 300 pixels wide version:

Large image

See file example_usage.htm for example usage. See source file dynamicImage.js for further details.

About

JavaScript library to enable dynamic change of image source based on <img> element width change.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published