Skip to content

Commit 7e09663

Browse files
committed
Concept in readme
1 parent 8f885fd commit 7e09663

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ The things to customize are the **padding-bottom** style, and the values of the
4747
```
4848
You can list image versions in the [WebP format](https://en.wikipedia.org/wiki/WebP) which will be used if the browser supports it.
4949

50+
## A new concept
51+
52+
Responsively Lazy is very different from the other lazy loading libraries. They make you break your HTML by removing the `src` attribute, or make you put tiny version there or make you use `<noscript>` to make your images appear in Google Images. The following code has worked for ages.
53+
```
54+
<img src="image.jpg" />
55+
```
56+
Let's not break it when we can enhance it.
57+
```
58+
<img src="image.jpg" data-src="image-200.jpg 200w, image-400.jpg 400w" srcset="..." />
59+
```
60+
5061
## Browser support
5162

5263
The lazy loading works in browsers supporting the srcset attribute. As of August 2015 that's [62.78%](http://caniuse.com/#feat=srcset). Unsupported browsers will load the image in the src attribute. That's the image search engines and social networks will find, so it's better to make it high resolution.

0 commit comments

Comments
 (0)