jQuery Responsive Image Plugin - Responsive Img

File Size: 6.55 KB
Views Total: 757
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Responsive Image Plugin - Responsive Img

Responsive Img is a jQuery plugin that changes an image's src attribute based on its container's width when the DOM is ready and when the browser is resized.

Basic Usage:

$("img").responsiveImg();

or

$("img").responsiveImg({
  breakpoints : {
    "_small":360,
    "_medium":780,
    "_large":900
  },
  srcAttribute : "src",
  pathToPHP : "js",
  createNewImages : true,
  jpegQuality : 100
});

2. Default Options

{
    breakpoints : {
    "_small":360,
    "_medium":780,
    "_large":900
  },
  srcAttribute : "src",
  pathToPHP : "js",
  createNewImages : true,
  jpegQuality : 100
}

Change Log:

v1.5 (2013-06-16)

  • fixed an issue where placeholder images weren't getting replaced when the original image was smaller than the breakpoint

v1.3 (2013-06-16)

  • fixed an issue where placeholder images weren't getting replaced when the original image was smaller than the breakpoint

This awesome jQuery plugin is developed by rewbrolik. For more Advanced Usages, please check the demo page or visit the official website.