tubalmartin / riloadr

Riloadr - A cross-browser framework-independent responsive images loader written in Javascript.
MIT License
646 stars 41 forks source link

Load higher resolution images if available #2

Closed wilsonwc closed 11 years ago

wilsonwc commented 12 years ago

This is a small patch to load larger breakpoint images if larger breakpoints are available. Basically a function to determine the largest breakpoint in the list of breakpoints, and new option for riloadr called monitorViewportWidth and a little logic to only set the img[RILOADR] = TRUE when you have loaded the largest breakpoint, or if monitorViewportWidth is false.

Ross

tubalmartin commented 12 years ago

Thanks for your interest @wilsonwc :)

I will test your pull request!

daraser commented 11 years ago

Hi,

Great library!

Any reason why this wasn't included? At this point I see one issue what it doesn't work both ways when decreasing resolution I doesn't update back to small image format? The actual problem with current way library works is what you aren't able to do art direction with it.

Thanks, Darius

tubalmartin commented 11 years ago

Version 1.4.0 is out and includes this feature and much more, check it out and spread the word ;)

Thanks for your feedback!